Expand description
General-purpose DAG algorithms.
Functionsยง
- closest_
common_ node - Finds the closest common neighbor among the
set1
andset2
. - closest_
common_ node_ ok - Finds the closest common
Ok
neighbor among theset1
andset2
. - 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 thestart
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 thestart
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 thestart
where neighbors come after the node itself.