temporal
Algorithms for the analysis of time-respecting paths in temporal graphs.
lift_order_temporal
¶
Lift a temporal graph to a second-order temporal event graph.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
pathpyG.core.temporal_graph.TemporalGraph
|
Temporal graph to lift. |
required |
delta
|
int
|
Maximum time difference between events to consider them connected. |
1
|
Returns:
| Name | Type | Description |
|---|---|---|
ho_index |
Edge index of the second-order temporal event graph. |
Source code in src/pathpyG/algorithms/temporal.py
temporal_shortest_paths
¶
Compute shortest time-respecting paths in a temporal graph.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
g
|
pathpyG.core.temporal_graph.TemporalGraph
|
Temporal graph to compute shortest paths on. |
required |
delta
|
int
|
Maximum time difference between events in a path. |
required |
Returns:
| Type | Description |
|---|---|
numpy.ndarray
|
Tuple of two numpy arrays: |
numpy.ndarray
|
|
typing.Tuple[numpy.ndarray, numpy.ndarray]
|
|