dynetx.algorithms.paths.all_time_respecting_paths

dynetx.algorithms.paths.all_time_respecting_paths(G, start=None, end=None, sample=1, min_t=None)

Computes all the simple paths among network node pairs. It assumes interaction chains of length 1 within each network snapshot.

Parameters

Ga DynGraph or DynDiGraph object

The graph to use for computing DAG

starttemporal id

min temporal id for bounding the DAG, default None

endtemporal id to conclude the search

max temporal id for bounding the DAG, default None

sample : percentage of paths to compute. Default, 1 min_t : temporal id for the source nodes, Default, None (all possible tids in [start, end])

Returns

paths: dictionary

A dictionary that associate to each node pair (u,v) the list of paths connecting them.

Examples

>>> import dynetx as dn
>>> g = dn.DynGraph()
>>> g.add_interaction("A", "B", 1, 4)
>>> g.add_interaction("B", "D", 2, 5)
>>> g.add_interaction("A", "C", 4, 8)
>>> g.add_interaction("B", "D", 2, 4)
>>> g.add_interaction("B", "C", 6, 10)
>>> g.add_interaction("B", "D", 2, 4)
>>> g.add_interaction("A", "B", 7, 9)
>>> paths = al.all_time_respecting_paths(g, start=1, end=9)