Module dag_walk

Module dag_walk 

Source
Expand description

General-purpose DAG algorithms.

Functionsยง

closest_common_node
Finds the closest common neighbor among the set1 and set2.
closest_common_node_ok
Finds the closest common Ok neighbor among the set1 and set2.
dfs
Traverses nodes from start in depth-first order.
dfs_ok
Traverses nodes from start in depth-first order.
heads
Find nodes in the start set that are not reachable from other nodes in the start set.
heads_ok
Finds Ok nodes in the start set that are not reachable from other nodes in the start set.
topo_order_forward
Builds a list of nodes reachable from the start where neighbors come before the node itself.
topo_order_forward_ok
Builds a list of Ok nodes reachable from the start where neighbors come before the node itself.
topo_order_reverse
Builds a list of nodes reachable from the start where neighbors come after the node itself.
topo_order_reverse_chunked
Splits DAG at the first single fork point, and builds a list of nodes reachable from the start where neighbors come after the node itself.
topo_order_reverse_lazy
Like topo_order_reverse(), but can iterate linear DAG lazily.
topo_order_reverse_lazy_ok
Like topo_order_reverse_ok(), but can iterate linear DAG lazily.
topo_order_reverse_ok
Builds a list of Ok nodes reachable from the start where neighbors come after the node itself.
topo_order_reverse_ord
Builds a list of nodes reachable from the start where neighbors come after the node itself.
topo_order_reverse_ord_ok
Builds a list of Ok nodes reachable from the start where neighbors come after the node itself.