depthFirstVisit

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.

Use this function if you need to efficiently make multiple passes over non-overlappng parts of the same graph, or depthFirstSearch if you just want to walk over the whole thing.

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

Members

Functions

depthFirstVisit
void depthFirstVisit(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