Skip to main content

No project description provided

Project description

pygarn PyPI version Tests Python 3.7 Python 3.8

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygarn-0.1.0.tar.gz (18.9 kB view hashes)

Uploaded Source

Built Distribution

pygarn-0.1.0-py3-none-any.whl (21.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page