limitedDfsWith : IGraph k e n -> List (Fin k) -> (s -> Fin k -> Either s a) -> s -> Fin k -> Either s a Traverses the graph in depth-first order from the given
start node and accumulates the nodes encountered with the
given function.
This abborts if the function returns a `Right`, otherwise it
continues with the traversal. The result is either the
accumulated state or the final result (if any).
Unlike `dfsWith`, this takes a list of nodes that are taboo, that is
that will already be set to `visited`. This allows us exclude certain
pathways from our search.
Totality: total
Visibility: exportdfsWith : IGraph k e n -> (s -> Fin k -> Either s a) -> s -> Fin k -> Either s a Traverses the graph in depth-first order from the given
start node and accumulates the nodes encountered with the
given function.
This abborts if the function returns a `Right`, otherwise it
continues with the traversal. The result is either the
accumulated state or the final result (if any).
Totality: total
Visibility: exportlimitedDfsWith' : IGraph k e n -> List (Fin k) -> (s -> Fin k -> s) -> s -> Fin k -> s Like `dfsWith` but accumulates the whole connected component
from the given starting node in depth-first order.
Totality: total
Visibility: exportdfsWith' : IGraph k e n -> (s -> Fin k -> s) -> s -> Fin k -> s Like `dfsWith` but accumulates the whole connected component
from the given starting node in depth-first order.
Totality: total
Visibility: exportlimitedDfs : IGraph k e n -> List (Fin k) -> Fin k -> SnocList (Fin k) Traverses the graph in depth-first order for the given start nodes
returning the encountered nodes in a `SnocList`.
Totality: total
Visibility: exportdfs : IGraph k e n -> Fin k -> SnocList (Fin k) Traverses the graph in depth-first order for the given start nodes
returning the encountered nodes in a `SnocList`.
Totality: total
Visibility: exportcdfsWith : IGraph k e n -> (s -> Fin k -> s) -> s -> List (Fin k) -> List s Traverses the graph in depth-first order for the given
start nodes and accumulates the nodes encountered with the
given function.
Unlike with `dfsWith`, results are accumulated component-wise,
using initial state `init` for every component we encounter.
Totality: total
Visibility: exportcdfsWith' : IGraph k e n -> (s -> Fin k -> s) -> s -> List s Traverses the whole graph in depth-first order
accumulates the nodes encountered with the given function.
Totality: total
Visibility: exportcdfs : IGraph k e n -> List (Fin k) -> List (SnocList (Fin k)) Traverses the graph in depth-first order for the given start nodes
returning the encountered nodes in a `SnocList`.
Totality: total
Visibility: exportcdfs' : IGraph k e n -> List (SnocList (Fin k)) Traverses the whole graph in depth-first order
returning the encountered nodes in a `SnocList`.
Totality: total
Visibility: exportdffWith : IGraph k e n -> (Fin k -> t) -> List (Fin k) -> Forest t Traverses the graph in depth-first order for the given
start nodes and converts the nodes encountered with the
given function.
Unlike `dfsWith`, this returns a forest of spanning trees
of the connected components encountered.
Totality: total
Visibility: exportdffWith' : IGraph k e n -> (Fin k -> t) -> Forest t Traverses the whole graph in depth-first order
converts the nodes encountered with the given function.
Unlike `dfsWith'`, this returns a forest of spanning trees
of the connected components encountered.
Totality: total
Visibility: exportdff : IGraph k e n -> List (Fin k) -> Forest (Fin k) Traverses the graph in depth-first order for the given start nodes
returning the encountered nodes in a list.
Unlike `dfs`, this returns a forest of spanning trees
of the connected components encountered.
Totality: total
Visibility: exportdff' : IGraph k e n -> Forest (Fin k) Traverses the whole graph in depth-first order
returning the encountered nodes in a list.
Unlike `dfs'`, this returns a forest of spanning trees
of the connected components encountered.
Totality: total
Visibility: exportcomponents : IGraph k e n -> List (SnocList (Fin k)) Collection of connected components
Totality: total
Visibility: exportnoComponents : IGraph k e n -> Nat Number of connected components
Totality: total
Visibility: exportisConnected : IGraph k e n -> Bool Is the graph connected?
Totality: total
Visibility: export