depthFirstSearch

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).

template depthFirstSearch(GraphT, VertexDescriptorT, VisitorT = NullVisitor!GraphT, ColourMapT = Colour[VertexDescriptorT])
void
depthFirstSearch
(
ref const(GraphT) graph
,
VertexDescriptorT root
,
ref ColourMapT colourMap
,
VisitorT visitor = VisitorT.init
)

Members

Functions

depthFirstSearch
void depthFirstSearch(const(GraphT) graph, VertexDescriptorT root, ColourMapT colourMap, VisitorT visitor)

Parameters

GraphT

The type of the graph object to traverse. Must model the incidence graph concept.

VertexDescriptorT

The descriptor type for vertices in a GraphT.

VisitorT

The visitor type.

ColourMapT

The type of the property map that will be used to control the graph traversal. Must model a property map that stores Colours keyed by a VertexDescriptorT.

Meta