anansi.algorithms.dfs

Implements depth-first search over graphs.

Members

Functions

all
bool all(RangeT range, DelegateT d)
Undocumented in source. Be warned that the author may not have intended to support it.
indexOf
auto indexOf(ValueT[] haystack, ValueT needle)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

NullVisitor
struct NullVisitor(GraphT)

A default implementation of the depth-first-search visitor concept. More specialised visitors can delegate the bits that they don't care about to an instance of NullVisitor without having to re-implement them.

Templates

depthFirstSearch
template depthFirstSearch(GraphT, VertexDescriptorT, VisitorT = NullVisitor!GraphT, ColourMapT = Colour[VertexDescriptorT])

Performs a depth-first traversal of the graph, which can be customised using a visitor object. Note that disconnected graphs will still be entirely traversed - this function will walk the spanning tree of each disconnected component (in random order).

depthFirstVisit
template depthFirstVisit(GraphT, VertexDescriptorT, VisitorT = NullVisitor!GraphT, ColourMapT = Colour[VertexDescriptorT])

Performs a depth-first traversal of the graph, which can be customised using a visitor object. The main difference between this function and depthFirstSearch is that depthFirstSearch will initialise the supplied colour map, but depthFirstVisit will use it as-is.

isDfsVisitor
template isDfsVisitor(V)

Compile time test to check if a given type can be considered a DFS visitor.

Meta