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.0-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.0-cp312-abi3-win_amd64.whl (17.6 MB view details)

Uploaded CPython 3.12+Windows x86-64

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

Uploaded CPython 3.12+macOS 11.0+ ARM64

reticula-0.12.0-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.0-cp311-cp311-win_amd64.whl (17.5 MB view details)

Uploaded CPython 3.11Windows x86-64

reticula-0.12.0-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.0-cp311-cp311-macosx_11_0_arm64.whl (47.7 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 10.15+ x86-64

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

Uploaded CPython 3.10Windows x86-64

reticula-0.12.0-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.0-cp310-cp310-macosx_11_0_arm64.whl (47.7 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

reticula-0.12.0-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.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for reticula-0.12.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 09dfb4b98d40612ce75e1f8d6133376cabd748c5a1d0ba813f2daac1d19e6637
MD5 5bc2bcc8097a37c322c3a09a1d6802c4
BLAKE2b-256 4b1504b17e8f041baa7b8a9ae0a4a41a1d78984f8865eeabf7da8898e2dcc720

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reticula-0.12.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.0.0 CPython/3.12.2

File hashes

Hashes for reticula-0.12.0-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5a91c185ec7dced018cd626773a642a790a96ba6b58742ea287e0595e77a9ce3
MD5 a5df4bdfe700182002efa3ca3c24ffd9
BLAKE2b-256 90267dc7334a0f4059313782170b5ac9f8544ad901712356be615aa356cc6a13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 632e27a178629d8a64be1b1e960f620711f0c0a35476724f3d10f56a9e4b4e82
MD5 539ed0db0688cfbc509f12dcb6b01235
BLAKE2b-256 db1b1f5c1844f284295b4d12f8f58045c3e023ec5cd7e32b19862e9fe64afb02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.0-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d476d4bb5a3b1d9c9fd1e95806c953ab7ed49c61a693170e425db9bea776c17f
MD5 84f5929e531759909707ef0d96a9063a
BLAKE2b-256 ada7d487bb247a09af55610876de0145d959728bf35739e83b3d27e5caf5f4c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.0-cp312-abi3-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 ab9cb9167d910cc47db62b8fe0cdc6320650eee417bf658145f28104e5f089eb
MD5 d6e82e753669c5fd56dec68919f0d5dd
BLAKE2b-256 791c76c204b59c2205767485d9754cbb4737d5a58d47bcc4ceb34244eb3ed19d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reticula-0.12.0-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.0.0 CPython/3.12.2

File hashes

Hashes for reticula-0.12.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e9e5bf366af005951167fc70cea38e34c61c7693bc093fd78fc9f84a106f58e0
MD5 fb434d96a63de18e4799a7acafcde832
BLAKE2b-256 3f1d7138fe24a29feb94658599a1639f64145e12ce874daa996790977e16fd43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d5749b6a14cf5f5d01c7a93d4d61c293b60abbbeb960e49cabcd5e56a46a6fa
MD5 087efd9d315f3e09620e6016cf436d4d
BLAKE2b-256 e619346e7aa39072f1ff23f4b0cfc0c59cdf43fbc0d0f0b9c15d4846c5bf2908

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 19759ecc48751eaf6462a58dce8a53b522c47162cfd1dba3130b7ff049b15826
MD5 443ffe08548bc4a47ef8334538f8ed0e
BLAKE2b-256 47affd7a666c71c66d30e28d85cf89a34972e23dddfa519bb512bd001108ce11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.0-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2df427d069501eb46df8abc668e579551fdd04c1740c8acef0cb0ba75d3cd89a
MD5 9e49b5a21130ac3846dff69af6c83d0d
BLAKE2b-256 8c1c2d718572d7c3db0cf3451eba6333980c25c4d4ed69121e4b676d3878791d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reticula-0.12.0-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.0.0 CPython/3.12.2

File hashes

Hashes for reticula-0.12.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a839ff1000e575771b77abad56ca78fff410ddac729a2e9565747cbb21a7f12f
MD5 5d7907ae59edc169b165f05e3b873372
BLAKE2b-256 5d46fdf8943d4962d7be70bff2a8a82f22fa7a2bf87fa058bc60d09335ac1b0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8ca3a9d7a52d61f8df7e71fc1116a7013df53d803ce9706786205b0e5181aecb
MD5 3de26ee293f4716d7be2427207147681
BLAKE2b-256 239c013b02e5f9d74424b217b56b74890e0345c35ee41600f659188d77351403

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 97f5d7a25889ef4759639b193f296bbebdcf924669bfbb18382d2cafc09f1c36
MD5 23412f368a4476eaf889e01e8a3844ba
BLAKE2b-256 f2d7c655623a70f6c02fb057c85a73b0a158008978eb0eaadd183521ad266343

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for reticula-0.12.0-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 9915e1709d00f6ecb51ed9ea443215f8b5d6cfc39e16b9411cdd971f9419b29e
MD5 d10f053cb0efd616bc44c07799fd07ca
BLAKE2b-256 78210a18710c8d5d11ed6537ae883545c3a14884d7aa1b6e3d1ba6907bc26bfd

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