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

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded PyPyWindows x86-64

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

Uploaded PyPymanylinux: glibc 2.17+ x86-64

reticula-0.12.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl (58.0 MB view details)

Uploaded PyPymacOS 10.15+ x86-64

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

Uploaded CPython 3.12+Windows x86-64

reticula-0.12.1-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.12.1-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.12.1-cp312-abi3-macosx_11_0_arm64.whl (47.5 MB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

reticula-0.12.1-cp312-abi3-macosx_10_15_x86_64.whl (58.0 MB view details)

Uploaded CPython 3.12+macOS 10.15+ x86-64

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

Uploaded CPython 3.11Windows x86-64

reticula-0.12.1-cp311-cp311-musllinux_1_2_x86_64.whl (23.1 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

reticula-0.12.1-cp311-cp311-macosx_11_0_arm64.whl (47.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

reticula-0.12.1-cp311-cp311-macosx_10_15_x86_64.whl (58.2 MB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

reticula-0.12.1-cp310-cp310-macosx_11_0_arm64.whl (47.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

reticula-0.12.1-cp310-cp310-macosx_10_15_x86_64.whl (58.2 MB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 170dcd0e2d4ca00a45bc29f349b808a3894af25d4c97ce04475460b35898ef70
MD5 fa7bde67dd7fdf6c8e264e00626cda67
BLAKE2b-256 cd02df8ee30131de51d7ad3dbb6b5a7b3f530b829b4e8d00bd215e3d2e809f83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 78ea839ab8e6bfa7971d17b9538fb85004b33182a5e496f0ceb5b4c9392ed3eb
MD5 667f0d21b5455afdb0fb090904153ac5
BLAKE2b-256 7b5a76ae4914ed0c15fff0933c290308ee6366330af759be26c09b473b9941a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-pp310-pypy310_pp73-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 1d4a6cf70a3c375732c12672cd5691f4a849fc0a37e413575605d9bc0747f1e1
MD5 4e60d1f4d8e8ddadbcb877140b9090dc
BLAKE2b-256 0b0756792aabbe968c49d7126e98316503e245405cfc08866d86486e34b8b57b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reticula-0.12.1-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.12.1-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0701ce0fd6d8e593a30b5beba87492a927366dbf22af0fb77cfb08d00b071a73
MD5 df3476fd0956628735f1febb6529d819
BLAKE2b-256 c7228bdd87320ab28a1ac485c9e7e16f2010ec0f0e8687f961d9ee1c504cc37c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp312-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 503853beff730d3517e454165b3f90168df7ff10c32ebaf6acc00cb962687eac
MD5 413dac847b49efe304867b85df8c669a
BLAKE2b-256 7a40195dfacac2d99d19639b5cfb385faa755f33b8f72023723a4887f83d77d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 59177ed90c0b5e86f662d0b769c9263fac66b8e1b395e7e305c5464799f2e43c
MD5 2131538f9a0c80787dd9f4f51afd97cc
BLAKE2b-256 974f2f9905596afc86d4197b2d5a4d6cb941006c70b02d5c10d12cbb61954b5c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2f169b546d757ad5b9314a3d93b64c6a1d94e63a0a400079b90bcc54a3fffbb4
MD5 f83fe0a36a13d46fa35b489069f17198
BLAKE2b-256 e3ed2a2468d083c5b3660fe4fda23aef832ed5f70e5bb7679c98e2b2622b171f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp312-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 6426ce2f4c7277c534c9e760d9340fe66ae25b2af278579853ba8b295e9f3f4a
MD5 1c52bdd331ae37da70e35bc185cda063
BLAKE2b-256 b5f7c60283fdefbd8b9dac137d9faa1101666b25f5a62155ae97627c2d0013b6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reticula-0.12.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 17.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for reticula-0.12.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2ce7cd785b027e628bc0957783bfe34aeea33bacd13a61ec6ad8663d55fb1983
MD5 13d6b809f57c6b9695e437a5185417b9
BLAKE2b-256 bc2b2adef1a744d2d2cbcbb366130292b2334c89123482b63fa32019564810ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2004b1bfd0efadae14ecdfecefb8b77724192b8e952a228ffa4c22f6ee79caa4
MD5 4ac153898e7d4ea9386ce0efb3657774
BLAKE2b-256 0ca2390648c143677df1d613d4c1a19da63e20be295dab2861c30d91ca0d2ef5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8d77f7da4a6e7e39ac8ad4bb4e420abe3a13774c9b636b00324dd5dd1433b9f0
MD5 c5da2002e3bb69014e3c56698c6d7d5e
BLAKE2b-256 9d1da33b17cf66ed94d0bfb8a53304820e8da0dbb98b15be6fc8582e2ae41b1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f5301cc397a954192acea8f5e4aecbc4dc153bdd9ac004ade8f6ddf70e5aac4e
MD5 2829abfafbe7b72e2b1deacde522e8a8
BLAKE2b-256 805757a33ff5020f6225af135437bf70320751d0b2b51a17df91c4623c4191eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 7b1db8de965940758d69db6c453a9c0d2cc0a1f2f127983816cc7f1133bd2f40
MD5 f40c989d56a2a8dd85ba6a0bb081860d
BLAKE2b-256 4926f41d9e5def006045a5216e0994f14a5a5ed4d24d054086b7b2fbe0d845a7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reticula-0.12.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 17.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for reticula-0.12.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ba3e5dbcb9dc8eb433a8206a578dd1a887afe0532902be2136588be7ba7ff9dd
MD5 f7142f9faacdf95eb29cc37a1628b3b1
BLAKE2b-256 ca3796d1d3102dfdb65e3bfd959f235dd9f9ffc085b598003bcc3f0c600a6f7d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b9b7252b55ac7a3a8f5193c2a4f2f124a1ae355a39fc63dff6e6fe2dd2aa79ab
MD5 9363e2892662d7435bd919fe7d9b7715
BLAKE2b-256 f7b835ca4d85f9f6ca35fd2b8e2150922b7dfaea9a08e232732959802a31bf2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8b3b52f224d35b8cee0e8d356a34117f747a271e9339f8ee89a867309ff07542
MD5 062c570765ec84943d6bdf80b77522c0
BLAKE2b-256 34c7113767149698793c276669d731a57ad40d35eb167e25dfefde2f29b15541

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f84115ff91978639ce3b474a49edcb8e6f925f435fe4825a3c068163b379194d
MD5 8f5a34b829ed14af99cf8c5c59acb9a2
BLAKE2b-256 f82093899f4baac0952cb86ef3a957c9dc8a61c5e269a7e70ee9fd543ab35296

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.1-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 bc4f56a81c5550aa66f56a808172cfe369d6d4bddf37800569ed0ad88c5a6e7a
MD5 1f2065f6a6eaf0943a1034a250550487
BLAKE2b-256 d610e9f865a1934cbdde05ef80f7d96494277e1a6437f2c9bf81cfc1814de7bf

See more details on using hashes here.

Supported by

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