anansi.algorithms.bfs

Definitions for running a breadth-first search over a graph

Members

Aliases

Edge
alias Edge = G.EdgeDescriptor
Undocumented in source.
G
alias G = AdjacencyList!(VecS, VecS, DirectedS, char, string)
Undocumented in source.
Vertex
alias Vertex = G.VertexDescriptor
Undocumented in source.

Functions

MakeTestGraph
TestGraph!GraphT MakeTestGraph()
Undocumented in source. Be warned that the author may not have intended to support it.
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.

TestGraph
struct TestGraph(GraphT)
Undocumented in source.

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