Efficient sampling of Geometric Inhomogeneous Random Graphs (GIRG). Wrapper for C++ libraries libgirg and libhypergirg.
Project description
GIRG sampling
A Python wrapper for the GIRGs sampling library (C++). Contains a direct wraper of the C++ library and NetworkX Graph generators (optional). Efficiently generates Geometric Inhomogeneous Random Graphs (GIRGs) and Hyperbolic Random Graphs (HRGs).
See the paper Efficiently Generating Geometric Inhomogeneous and Hyperbolic Random Graphs for details of the algorithm.
Install
Install from PyPI as girg-sampling
via pip
, poetry
etc.
To build the package locally, install Poetry package manager and run poetry build
, optionally with poetry install
.
To use generateNetworkX
functions, you need to have the networkx
package (not a default dependency of girg-sampling
)
Usage
import girg_sampling
g = girg_sampling.girgs.generateNetworkX(n=135, ple=1.5, dim=4, deg=4.2, alpha=100, seed=41)
h = girg_sampling.hypergirgs.generateNetworkX(n=1001, alpha=0.75, T=0.7, deg=2.2, seed=None)
See tests for sample usage of the raw C++ wrappers.
Changelog
- 0.1.0: A direct wrapper of the C++ graph generator functions.
- 0.2.0: Minor fixes, unify
seed
param, add e2e tests, build wheels for python up to 3.10 - 0.2.1: Update urllib3 dev-dependency for twine under Python 3.10
- 0.3.0: Add NetworkX wrapper, update python version, add docs.
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
Built Distributions
Hashes for girg_sampling-0.3.0-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74d9072e8940e02ef86b3647bcfa37457e40ca6cb13858aab5a9040f703d7176 |
|
MD5 | da65c56a0c7fd0f9d0a69f0fb85ac6cd |
|
BLAKE2b-256 | 7f21e2aeeefe7ec0a760de34ce7e8ffe01484d5540ffd1fb83f0801c461bf568 |
Hashes for girg_sampling-0.3.0-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be6fbb293866f8ac16bbb2b550f41aa597dfa9464bf12c49d0e8d78b1152b4cd |
|
MD5 | f56ecd8f422e29019f9fb4a430b37e9e |
|
BLAKE2b-256 | 1f2d636bee893fbb36db9365291b43c702fd6ee1567de97abbe8748b576e1316 |
Hashes for girg_sampling-0.3.0-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be3fa03cb87680dd8bd2766522872a3aac316f7f485830661943c3f3186589b8 |
|
MD5 | e16d562f0a1c872f012df792c51f284d |
|
BLAKE2b-256 | 4ba844e9a9e61dca62a581cc232d1e07e83e80e15422c0efe066dcc68641971d |
Hashes for girg_sampling-0.3.0-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a18ec5279549565db7966e2bc1c4e35e77b81d8c8fe177052b929b02daf02ba |
|
MD5 | 9ed3b2a478109a418bbc7a923979d5f6 |
|
BLAKE2b-256 | a4701ecde7d35e252bf72604d76a5417dd151401c35d56d52d7076c3c05505d7 |
Hashes for girg_sampling-0.3.0-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05dffb03991803fd3af342a884f4ea123df0e7e1e9f54e53698a1221d2336650 |
|
MD5 | eff53c51b81d9433ea96c76f91730a02 |
|
BLAKE2b-256 | 37a2d388e4f10519157302c6613b9da869cb3a7d5ea3fc948fe46d8f41a35051 |