Skip to main content

Analyse temporal network and hypergraphs efficiently.

Project description

Python bindings for Reticula Documentations Paper

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)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

reticula-0.13.0-pp310-pypy310_pp73-win_amd64.whl (17.5 MB view details)

Uploaded PyPy Windows x86-64

reticula-0.13.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.0 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

reticula-0.13.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl (49.8 MB view details)

Uploaded PyPy macOS 10.15+ x86-64

reticula-0.13.0-cp312-abi3-win_amd64.whl (17.6 MB view details)

Uploaded CPython 3.12+ Windows x86-64

reticula-0.13.0-cp312-abi3-musllinux_1_2_x86_64.whl (23.1 MB view details)

Uploaded CPython 3.12+ musllinux: musl 1.2+ x86-64

reticula-0.13.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.1 MB view details)

Uploaded CPython 3.12+ manylinux: glibc 2.17+ x86-64

reticula-0.13.0-cp312-abi3-macosx_11_0_arm64.whl (42.2 MB view details)

Uploaded CPython 3.12+ macOS 11.0+ ARM64

reticula-0.13.0-cp312-abi3-macosx_10_15_x86_64.whl (49.9 MB view details)

Uploaded CPython 3.12+ macOS 10.15+ x86-64

reticula-0.13.0-cp311-cp311-win_amd64.whl (17.5 MB view details)

Uploaded CPython 3.11 Windows x86-64

reticula-0.13.0-cp311-cp311-musllinux_1_2_x86_64.whl (23.0 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

reticula-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

reticula-0.13.0-cp311-cp311-macosx_11_0_arm64.whl (42.4 MB view details)

Uploaded CPython 3.11 macOS 11.0+ ARM64

reticula-0.13.0-cp311-cp311-macosx_10_15_x86_64.whl (50.0 MB view details)

Uploaded CPython 3.11 macOS 10.15+ x86-64

reticula-0.13.0-cp310-cp310-win_amd64.whl (17.5 MB view details)

Uploaded CPython 3.10 Windows x86-64

reticula-0.13.0-cp310-cp310-musllinux_1_2_x86_64.whl (23.1 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.2+ x86-64

reticula-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

reticula-0.13.0-cp310-cp310-macosx_11_0_arm64.whl (42.4 MB view details)

Uploaded CPython 3.10 macOS 11.0+ ARM64

reticula-0.13.0-cp310-cp310-macosx_10_15_x86_64.whl (50.0 MB view details)

Uploaded CPython 3.10 macOS 10.15+ x86-64

File details

Details for the file reticula-0.13.0-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 5408df730c1a8f7d39a8b67511a2c04e5b383f70bb3b5fe4e6d3a78f1c312efb
MD5 112cc3b81856aecd8833e171ec9d3096
BLAKE2b-256 ba63706afd1b5591f3c17aa31a8b4a8597e7f094967dba8d3512ded502b8fbec

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2ce69a76a4d37202623fd8eb354143d232ed4e430652ac980921004b670506a3
MD5 4bffab19991ff66c681e815505fec22c
BLAKE2b-256 081004970e1b5c623ba87e6183ba7ad67163d18b516411125ee0c71962c2b052

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7e90162e4d4a131f48776ca7cf4090f854e66ffac3ca1fb72723a765f86a3ebc
MD5 fb5e4e184edfc31cce674a7c517d47da
BLAKE2b-256 0adccc07f98ef9ba7b2f35d45c21abbfff79b514ce09dcc7e1e7644a423d57f1

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: reticula-0.13.0-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 17.6 MB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for reticula-0.13.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 83dc260ddc3355e1d8210899b525af76025f40b2a66440ba3bff8c6ef830e342
MD5 65cb99db8cd23d9b52fba7297994c361
BLAKE2b-256 e39cde037e546e5126cf38a04b3dde65b1e62f6761b60c2a231d495a26f647e1

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp312-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7d1b5dcf8c05782be91dccdcb44aac9e752909bdd2188836c5f2396e2b6a910a
MD5 32f4aee25c4528fd58bdb8650fc43fe7
BLAKE2b-256 b5a6cbb2c72075159dc3a4ea210cafa6a90e440672bbc3e498bc6dfdc0b5ca9c

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e5485e79efc8b142b62941e8c550950352a7f12d62e0d54ceb308ba1673bb80c
MD5 888b5a84729c8bf6fd6a51dde321176a
BLAKE2b-256 f114577fb133acde6ac28443f584f7de6b408af639a72dfb7738a60bddde179a

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6add3b399dc602590a7b7a7c54a3fbb7276eaf7e476e779d2e2866bda6060899
MD5 7498ac016d6da602a58cb55303c630ba
BLAKE2b-256 0ed1537ae005f3133e688f66332e3281e0f252228d125d2ac0efa21e0acb043e

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp312-abi3-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp312-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 3d66eb3ba61491663b3df58df22122fc1f6987fd6523b89fff98af7e91e78285
MD5 8a5d23092a33de0f2026c136b32b3a18
BLAKE2b-256 a23dfdb546e669cc9177e4bcbd612ce79748501f0878931bbc5de887678008e3

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 be36cebd7d7d834fdcd929dd3c4cc8797958a7cb4e8759323e47681781cd4f7c
MD5 46f34ee98d23492d6c57382dac4148e0
BLAKE2b-256 2a27cf4d068f62ef8c838c1850910b7167cd2f9731b2b86fad083e48a59454d1

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2e4b427bba1a3d1df5796d4285c8284b5231ecac2c32c9bed3f84a0579d158d2
MD5 12dd7cad53ab61456cb0f5889e88b5d0
BLAKE2b-256 3dcf623ea8706f7fe4e0078a369b2f3aa8b37cff16c313ec6c9b036356e690a7

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af56198bbd2324ffea28afb8a48996babecf6c7b4f4f1f218f2e36e4fb06d448
MD5 3d218fc0550ee259e8f0b7327f53c358
BLAKE2b-256 c95e11956333ce435387d6eaf66b1b55608714e8a59c4b89fde417e8145e6942

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eadf6128e43050c60f22bebba761996113738cd08ab1ef620da95e0efb422f0c
MD5 ffc551d04e472d19030a75876fcb72b8
BLAKE2b-256 bcfa7c3b70edd22f8750727e8fe44d4956d78575aabcf85c5ba073b5da035fe6

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2c1e3621a61bef3eeb2d1e5a5e4e37c0ee279a6c77e5036818589a8d391eb41e
MD5 2b48d371a48f89ae5f259a554fc18fb4
BLAKE2b-256 35665ba110c477e4a74a171738d0b70e536da317f11c92d20e21e1c220b3e527

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 739a62bfabceddcd51441b68e013b5c0431a30aef1946d5cfd0ecb10810170b5
MD5 317f4e1206922eb64943e1b366f345a7
BLAKE2b-256 593d3daecf4aeb4b919fd662ba294412d3255f4b5ee0da749c75089782e4ef07

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ea889087dfe5d40a48b6e9eb518e8a081760915e6f95013765f90384768e17ed
MD5 7ba50f96dcf3ea238e74b41afcb6cd80
BLAKE2b-256 9f8f270eff8b7f1d973232bef3bb91a9096d71ae0a41a01ae0a0970b6964fecf

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 490486bb5f3554ae3b13969e2daf59fa0a82b9c1f38bb8b358670ecfd0a1a476
MD5 e416c59b7be78365ed2bc1e19f3460ef
BLAKE2b-256 1647bc369264d86c8765212dcc9e007a76b688de3a434065144b43e51ba2563d

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 31c022b3f4d79c74f4276afe019062441b58f801c58ed8fc1e3081026ca3d234
MD5 80df2f6863016edd905ee1e467e95378
BLAKE2b-256 9beadce05dfb3e10af632c9aa869bd67328c4823fb038c38b73eb6e29183426d

See more details on using hashes here.

File details

Details for the file reticula-0.13.0-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.13.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 12bdc5301b524f7125f57592029a94110012de2d6198c47cb9003d812e184725
MD5 d9faa55eba4eb5d4d981a8874c65cec9
BLAKE2b-256 e7b353253009dcc96fa75b16467342fd75ea4b1bb6fcaf13e398d34d69363cf3

See more details on using hashes here.

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