Idris2Doc : Data.Graph.Indexed.Query.DFS

Data.Graph.Indexed.Query.DFS

(source)
This modules provides several functions for traversing
graphs in depth-first order and accumulating results in
various ways along the way.

Definitions

limitedDfsWith : IGraphken->List (Fink) -> (s->Fink->Eithersa) ->s->Fink->Eithersa
  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: export
dfsWith : IGraphken-> (s->Fink->Eithersa) ->s->Fink->Eithersa
  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: export
limitedDfsWith' : IGraphken->List (Fink) -> (s->Fink->s) ->s->Fink->s
  Like `dfsWith` but accumulates the whole connected component
from the given starting node in depth-first order.

Totality: total
Visibility: export
dfsWith' : IGraphken-> (s->Fink->s) ->s->Fink->s
  Like `dfsWith` but accumulates the whole connected component
from the given starting node in depth-first order.

Totality: total
Visibility: export
limitedDfs : IGraphken->List (Fink) ->Fink->SnocList (Fink)
  Traverses the graph in depth-first order for the given start nodes
returning the encountered nodes in a `SnocList`.

Totality: total
Visibility: export
dfs : IGraphken->Fink->SnocList (Fink)
  Traverses the graph in depth-first order for the given start nodes
returning the encountered nodes in a `SnocList`.

Totality: total
Visibility: export
cdfsWith : IGraphken-> (s->Fink->s) ->s->List (Fink) ->Lists
  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: export
cdfsWith' : IGraphken-> (s->Fink->s) ->s->Lists
  Traverses the whole graph in depth-first order
accumulates the nodes encountered with the given function.

Totality: total
Visibility: export
cdfs : IGraphken->List (Fink) ->List (SnocList (Fink))
  Traverses the graph in depth-first order for the given start nodes
returning the encountered nodes in a `SnocList`.

Totality: total
Visibility: export
cdfs' : IGraphken->List (SnocList (Fink))
  Traverses the whole graph in depth-first order
returning the encountered nodes in a `SnocList`.

Totality: total
Visibility: export
dffWith : IGraphken-> (Fink->t) ->List (Fink) ->Forestt
  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: export
dffWith' : IGraphken-> (Fink->t) ->Forestt
  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: export
dff : IGraphken->List (Fink) ->Forest (Fink)
  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: export
dff' : IGraphken->Forest (Fink)
  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: export
components : IGraphken->List (SnocList (Fink))
  Collection of connected components

Totality: total
Visibility: export
noComponents : IGraphken->Nat
  Number of connected components

Totality: total
Visibility: export
isConnected : IGraphken->Bool
  Is the graph connected?

Totality: total
Visibility: export