pygarn

Forward- and backward operations on graphs with a lot of fuzzyness.
Install via
- pip:
pip install pygarn - poetry:
poetry add pygarn - or add in your conda environment:
name: sur-your-env-name
channels:
- defaults
dependencies:
- python>=3.8
- pip
- pip:
- pygarn
Visuals
Examples
import networkx as nx
from pygarn.base import RandomVertexSelector
from pygarn.growth import AddCompleteGraph
n_vertices_initial = 20
g_initial = nx.erdos_renyi_graph(n_vertices_initial, 0.3)
op_add_kcomplete = AddCompleteGraph(
size=3,
sources=RandomVertexSelector(min=1, max=3),
targets=RandomVertexSelector(min=1, max=3),
)
g_new = op_add_kcomplete.forward(g_initial)
g_orig = op_add_kcomplete.backward(g_new)
# Should be highly likely:
assert nx.is_isomorphic(g_orig, g_initial)
import networkx as nx
from pygarn.base import VertexDegreeSelector
from pygarn.growth import AddVertex
n_vertices_initial = 20
g_initial = nx.erdos_renyi_graph(n_vertices_initial, 0.3)
n_edges_initial = len(g_initial.edges)
degrees_initial = [(v, d) for v, d in g_initial.degree()]
selector = VertexDegreeSelector()
op_add = AddVertex()
n_rounds = 5
g_current = g_initial.copy()
for _ in range(n_rounds):
g_current = op_add.forward(g_current)
Metadata
Release files for pygarn 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pygarn-0.2.0.tar.gz | 21.0 kB | Without provenance | Details for pygarn-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pygarn-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pygarn-0.2.0-py3-none-any.whl |
Total release size: 44.2 kB
Release files / pygarn-0.2.0.tar.gz
| Download URL | pygarn-0.2.0.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1425c8405e16ee1a18366e63c19dd5ed09ac019d931deaeb401f94a67555852f
|
|
BLAKE2b-256 checksum How to use checksums |
d5020529da547bbe426bc3adb3f75a24c1c0af6b6ea0f3e25974cab62ecb9195
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.12
|
Release files / pygarn-0.2.0-py3-none-any.whl
| Download URL | pygarn-0.2.0-py3-none-any.whl |
|---|---|
| Size | 23.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1551d95fb899972d5a894630960b1a9cb9dde97fa2b13c35a0deedc631c57fcd
|
|
BLAKE2b-256 checksum How to use checksums |
aee90f2656522ec6f381de93bff39ef81ca15bbe3d835b100752fd6b8b4794da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.2 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.9.12
|
Security for pygarn 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.