Python bindings for Reticula

Installation
The library offers pre-compiled Wheels for x64 Windows, MacOS and Linux. The library currently supports Python version 3.10 or newer.
$ pip install reticula
Installing from source
Alternatively you can install the library from source:
Clone the library:
$ git clone https://github.com/arashbm/reticula-python.git
Build the Wheel:
$ cd reticula-python
$ pip install .
Note that compiling from source requires an unbelievable amount (> 40GB) of RAM.
Basic examples
Generate a random static network and investigate:
>>> import reticula as ret
>>> state = ret.mersenne_twister(42) # create a pseudorandom number generator
>>> g = ret.random_gnp_graph[ret.int64](n=100, p=0.02, random_state=state)
>>> g
<undirected_network[int64] with 100 verts and 110 edges>
>>> g.vertices()
[0, 1, 2, 3, .... 99]
>>> g.edges()
[undirected_edge[int64](0, 16), undirected_edge[int64](0, 20),
undirected_edge[int64](0, 31), undirected_edge[int64](0, 51), ...]
>>> ret.connected_components(g)
[<component[int64] of 1 nodes: {9}>, <component[int64] of 1 node {33}>, ...]
>>> lcc = max(ret.connected_components(g), key=len)
>>> lcc
<component[int64] of 93 nodes: {99, 96, 95, 94, ...}>
>>> g2 = ret.vertex_induced_subgraph(g, lcc)
>>> g2
<undirected_network[int64] with 93 verts and 109 edges>
A more complete example of static network percolation analysis, running on
multiple threads, can be found in
examples/static_network_percolation/
Create a random fully-mixed temporal network and calculate simple (unconstrained) reachability from node 0 at time 0 to all nodes and times.
>>> import reticula as ret
>>> state = ret.mersenne_twister(42)
>>> g = ret.random_fully_mixed_temporal_network[ret.int64](\
... size=100, rate=0.01, max_t=1024, random_state=state)
>>> adj = ret.temporal_adjacency.simple[\
... ret.undirected_temporal_edge[ret.int64, ret.double]]()
>>> cluster = ret.out_cluster(\
... temporal_network=g, temporal_adjacency=adj, vertex=0, time=0.0)
>>> cluster
<temporal_cluster[undirected_temporal_edge[int64, double],
simple[undirected_temporal_edge[int64, double]]] with volume 100
and lifetime (0 1.7976931348623157e+308]>
>>> cluster.covers(vertex=12, time=100.0)
True
>>> # Let's see all intervals where vert 15 is reachable from vert 0 at t=0.0:
>>> list(cluster.interval_sets()[15])
[(3.099055278145548, 1.7976931348623157e+308)]
Let's now try limited waiting-time (with $dt = 5.0$) reachability:
>>> import reticula as ret
>>> state = ret.mersenne_twister(42)
>>> g = ret.random_fully_mixed_temporal_network[int64](\
... size=100, rate=0.01, max_t=1024, random_state=state)
>>> adj = ret.temporal_adjacency.limited_waiting_time[\
... ret.undirected_temporal_edge[ret.int64, ret.double]](dt=5.0)
>>> cluster = ret.out_cluster(\
... temporal_network=g, temporal_adjacency=adj, vertex=0, time=0.0)
>>> cluster
<temporal_cluster[undirected_temporal_edge[int64, double],
limited_waiting_time[undirected_temporal_edge[int64, double]]] with
volume 100 and lifetime (0 1028.9972186553928]>
>>> cluster.covers(vertex=15, time=16.0)
True
>>> list(cluster.interval_sets()[15])
[(3.099055278145548, 200.17866501023616),
(200.39858803326402, 337.96139372380003),
...
(1017.5258263596586, 1028.9149586273347)]
>>> # Total "human-hours" of reachability cluster
>>> cluster.mass()
101747.97444555275
>>> # Survival time of the reachability cluster
>>> cluster.lifetime()
(0.0, 1028.9972186553928)
Metadata
Release files for reticula 0.13.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 558.2 MB
Release files / reticula-0.13.0-pp310-pypy310_pp73-win_amd64.whl
| Download URL | reticula-0.13.0-pp310-pypy310_pp73-win_amd64.whl |
|---|---|
| Size | 17.5 MB |
| Tags | PyPy 3.10 PyPy 3.10 7.3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
5408df730c1a8f7d39a8b67511a2c04e5b383f70bb3b5fe4e6d3a78f1c312efb
|
|
BLAKE2b-256 checksum How to use checksums |
ba63706afd1b5591f3c17aa31a8b4a8597e7f094967dba8d3512ded502b8fbec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | reticula-0.13.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 23.0 MB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
2ce69a76a4d37202623fd8eb354143d232ed4e430652ac980921004b670506a3
|
|
BLAKE2b-256 checksum How to use checksums |
081004970e1b5c623ba87e6183ba7ad67163d18b516411125ee0c71962c2b052
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / reticula-0.13.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl
| Download URL | reticula-0.13.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl |
|---|---|
| Size | 49.8 MB |
| Tags | PyPy 3.10 PyPy 3.10 7.3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
7e90162e4d4a131f48776ca7cf4090f854e66ffac3ca1fb72723a765f86a3ebc
|
|
BLAKE2b-256 checksum How to use checksums |
0adccc07f98ef9ba7b2f35d45c21abbfff79b514ce09dcc7e1e7644a423d57f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-cp312-abi3-win_amd64.whl
| Download URL | reticula-0.13.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 17.6 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
83dc260ddc3355e1d8210899b525af76025f40b2a66440ba3bff8c6ef830e342
|
|
BLAKE2b-256 checksum How to use checksums |
e39cde037e546e5126cf38a04b3dde65b1e62f6761b60c2a231d495a26f647e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-cp312-abi3-musllinux_1_2_x86_64.whl
| Download URL | reticula-0.13.0-cp312-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 23.1 MB |
| Tags | CPython 3.12 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7d1b5dcf8c05782be91dccdcb44aac9e752909bdd2188836c5f2396e2b6a910a
|
|
BLAKE2b-256 checksum How to use checksums |
b5a6cbb2c72075159dc3a4ea210cafa6a90e440672bbc3e498bc6dfdc0b5ca9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / reticula-0.13.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | reticula-0.13.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 23.1 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e5485e79efc8b142b62941e8c550950352a7f12d62e0d54ceb308ba1673bb80c
|
|
BLAKE2b-256 checksum How to use checksums |
f114577fb133acde6ac28443f584f7de6b408af639a72dfb7738a60bddde179a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / reticula-0.13.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | reticula-0.13.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 42.2 MB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
6add3b399dc602590a7b7a7c54a3fbb7276eaf7e476e779d2e2866bda6060899
|
|
BLAKE2b-256 checksum How to use checksums |
0ed1537ae005f3133e688f66332e3281e0f252228d125d2ac0efa21e0acb043e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-cp312-abi3-macosx_10_15_x86_64.whl
| Download URL | reticula-0.13.0-cp312-abi3-macosx_10_15_x86_64.whl |
|---|---|
| Size | 49.9 MB |
| Tags | CPython 3.12 abi3 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
3d66eb3ba61491663b3df58df22122fc1f6987fd6523b89fff98af7e91e78285
|
|
BLAKE2b-256 checksum How to use checksums |
a23dfdb546e669cc9177e4bcbd612ce79748501f0878931bbc5de887678008e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-cp311-cp311-win_amd64.whl
| Download URL | reticula-0.13.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 17.5 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
be36cebd7d7d834fdcd929dd3c4cc8797958a7cb4e8759323e47681781cd4f7c
|
|
BLAKE2b-256 checksum How to use checksums |
2a27cf4d068f62ef8c838c1850910b7167cd2f9731b2b86fad083e48a59454d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-cp311-cp311-musllinux_1_2_x86_64.whl
| Download URL | reticula-0.13.0-cp311-cp311-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 23.0 MB |
| Tags | CPython 3.11 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
2e4b427bba1a3d1df5796d4285c8284b5231ecac2c32c9bed3f84a0579d158d2
|
|
BLAKE2b-256 checksum How to use checksums |
3dcf623ea8706f7fe4e0078a369b2f3aa8b37cff16c313ec6c9b036356e690a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / reticula-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | reticula-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 23.0 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
af56198bbd2324ffea28afb8a48996babecf6c7b4f4f1f218f2e36e4fb06d448
|
|
BLAKE2b-256 checksum How to use checksums |
c95e11956333ce435387d6eaf66b1b55608714e8a59c4b89fde417e8145e6942
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / reticula-0.13.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | reticula-0.13.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 42.4 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
eadf6128e43050c60f22bebba761996113738cd08ab1ef620da95e0efb422f0c
|
|
BLAKE2b-256 checksum How to use checksums |
bcfa7c3b70edd22f8750727e8fe44d4956d78575aabcf85c5ba073b5da035fe6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-cp311-cp311-macosx_10_15_x86_64.whl
| Download URL | reticula-0.13.0-cp311-cp311-macosx_10_15_x86_64.whl |
|---|---|
| Size | 50.0 MB |
| Tags | CPython 3.11 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
2c1e3621a61bef3eeb2d1e5a5e4e37c0ee279a6c77e5036818589a8d391eb41e
|
|
BLAKE2b-256 checksum How to use checksums |
35665ba110c477e4a74a171738d0b70e536da317f11c92d20e21e1c220b3e527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-cp310-cp310-win_amd64.whl
| Download URL | reticula-0.13.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 17.5 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
739a62bfabceddcd51441b68e013b5c0431a30aef1946d5cfd0ecb10810170b5
|
|
BLAKE2b-256 checksum How to use checksums |
593d3daecf4aeb4b919fd662ba294412d3255f4b5ee0da749c75089782e4ef07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-cp310-cp310-musllinux_1_2_x86_64.whl
| Download URL | reticula-0.13.0-cp310-cp310-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 23.1 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 |
|
SHA-256 checksum How to use checksums |
ea889087dfe5d40a48b6e9eb518e8a081760915e6f95013765f90384768e17ed
|
|
BLAKE2b-256 checksum How to use checksums |
9f8f270eff8b7f1d973232bef3bb91a9096d71ae0a41a01ae0a0970b6964fecf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / reticula-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | reticula-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 23.0 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
490486bb5f3554ae3b13969e2daf59fa0a82b9c1f38bb8b358670ecfd0a1a476
|
|
BLAKE2b-256 checksum How to use checksums |
1647bc369264d86c8765212dcc9e007a76b688de3a434065144b43e51ba2563d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / reticula-0.13.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | reticula-0.13.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 42.4 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
31c022b3f4d79c74f4276afe019062441b58f801c58ed8fc1e3081026ca3d234
|
|
BLAKE2b-256 checksum How to use checksums |
9beadce05dfb3e10af632c9aa869bd67328c4823fb038c38b73eb6e29183426d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / reticula-0.13.0-cp310-cp310-macosx_10_15_x86_64.whl
| Download URL | reticula-0.13.0-cp310-cp310-macosx_10_15_x86_64.whl |
|---|---|
| Size | 50.0 MB |
| Tags | CPython 3.10 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
12bdc5301b524f7125f57592029a94110012de2d6198c47cb9003d812e184725
|
|
BLAKE2b-256 checksum How to use checksums |
e7b353253009dcc96fa75b16467342fd75ea4b1bb6fcaf13e398d34d69363cf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|