breadthFirstVisit

Breadth-first traversal of the graph from a given starting point. This function does not reset the colourMap, so can be efficiently used repeatedly on components of the graph.

template breadthFirstVisit(GraphT, VertexDescriptorT, VisitorT = NullVisitor!GraphT, ColourMapT = Colour[VertexDescriptorT], QueueT = FifoQueue!VertexDescriptorT)
void
breadthFirstVisit
(
ref const(GraphT) graph
,
VertexDescriptorT source
,
ref ColourMapT colour
,
ref QueueT queue
,
VisitorT visitor = VisitorT.init
)

Members

Functions

breadthFirstVisit
void breadthFirstVisit(const(GraphT) graph, VertexDescriptorT source, ColourMapT colour, QueueT queue, 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.

QueueT

The type of the queue used to order the expansion of vertices. Changing the queue type can be used to customise the behaviour of the search (e.g. using a priority queue rather than the default FIFO queue.

Meta