straph.dags package¶
Submodules¶
straph.dags.condensation_dag module¶
-
class
straph.dags.condensation_dag.
CondensationDag
(id=None, times=None, c_nodes=None, c_links=None, id_comp_to_comp=None, node_to_id_comp=None, segmented_node_to_id_comp=None, adj_list=None)[source]¶ Bases:
straph.dags.dag.Dag
-
all_fastest_paths
(source, destination)[source]¶ Compute the fastest path between ‘source’ and ‘destination’
- Parameters
-
source –
destination –
- Returns
-
all_fastest_paths_ss
(source)[source]¶ Compute the fastest path between ‘source’ and all other nodes (in condensation DAG)
- Parameters
source –
- Returns
-
fastest_path
(source, destination)[source]¶ Compute the fastest path between ‘source’ and ‘destination’
- Parameters
-
source –
destination –
- Returns
-
foremost_path
(source, destination)[source]¶ Compute a foremost path between ‘source’ and ‘destination” starting at ‘begin time’.
- Parameters
-
source –
destination –
- Returns
-
path_induced_substream
(path, node_to_label=None, path_bounds=None)[source]¶ Transform a path in the condensation dag into a substream
- Parameters
-
path – Sequence of identifiers of
StronglyConnectedComponent
objects in the currentCondensationDag
node_to_label –
path_bounds –
- Returns
-
plot_fastest_path
(path, latency, source, destination, col='#8f246b')[source]¶ Draw a path on the current
CondensationDag
- Parameters
-
path –
latency –
source –
destination –
col –
- Returns
-
plot_foremost_path
(path, ttr, source, destination, col='#8f246b')[source]¶ Draw a path on the current
CondensationDag
- Parameters
-
path – A Stream Graph
ttr –
source –
destination –
col –
- Returns
-
shortest_fastest_path_ss
(source, node_to_label=None)[source]¶ Compute Shortest Fastest Paths in a single source manner in a
StreamGraph
using the currentCondensationDag
.- Parameters
-
source –
node_to_label –
- Returns
-
-
straph.dags.condensation_dag.
compute_all_foremost_paths
(dict_id_wcc_to_dag, index_node_to_scc, source, destination, duration_threshold=None, start_comp=None)[source]¶ Compute a foremost path between ‘source’ and ‘destination” starting at ‘begin time’.
- Parameters
-
dict_id_wcc_to_dag –
index_node_to_scc –
source –
destination –
duration_threshold –
start_comp –
- Returns
straph.dags.dag module¶
-
class
straph.dags.dag.
Dag
(id=None, times=None, c_nodes=None, c_links=None, id_comp_to_comp=None, node_to_id_comp=None, segmented_node_to_id_comp=None, adj_list=None)[source]¶ Bases:
object
-
straph.dags.dag.
add_arrow
(e, ax, direction='right', size=25, color=None, alpha=0.5)[source]¶ Thanks to : https://stackoverflow.com/questions/34017866/arrow-on-a-line-plot-with-matplotlib add an arrow to a line.
- Parameters
-
e – ((a_x,_y),(b_x,b_y))
ax – matplotlib axes
direction – ‘left’ or ‘right’
size – size of the arrow in fontsize points
color – color of arrow (should be coherent with line color, or not )
alpha –
- Returns
straph.dags.stable_dag module¶
-
class
straph.dags.stable_dag.
StableDag
(id=None, times=None, c_nodes=None, c_links=None, id_comp_to_comp=None, node_to_id_comp=None, segmented_node_to_id_comp=None, adj_list=None)[source]¶ Bases:
straph.dags.dag.Dag