anansi.algorithms.bfs

Definitions for running a breadth-first search over a graph

Members

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

breadthFirstSearch
template breadthFirstSearch(GraphT, VertexDescriptorT, VisitorT = NullVisitor!GraphT, ColourMapT = Colour[VertexDescriptorT], QueueT = FifoQueue!(VertexDescriptorT))

A generic breadth-first search algorithm that can be customised using a visitor.

breadthFirstVisit
template breadthFirstVisit(GraphT, VertexDescriptorT, VisitorT = NullVisitor!GraphT, ColourMapT = Colour[VertexDescriptorT], QueueT = FifoQueue!VertexDescriptorT)

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.

isBfsVisitor
template isBfsVisitor(V)

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

Meta