#include <iterator.hpp>
Public Member Functions | |
ibreadth (const undirected_graph &g, vertex_type root) | |
create breadth first iterator for graph and given root vertex | |
ibreadth (const undirected_graph &g) | |
create breadth first iterator for graph starting at vertex 0 | |
vertex_type | operator* () |
dereference returns graph vertex identifier | |
ibreadth & | operator++ () |
advance to the vertex in the breadth first sequence | |
bool | operator== (ibreadth &rhs) |
comparison of iterators returns true, if both point to the same vertex of the same graph object. | |
link_type | via () const |
return identifier of the link that lead to the actual vertex | |
unsigned int | distance () |
return the (minimal) distance of the actual vertex from the root vertex | |
bool | valid () const |
test iterator validity. |
While iterating, all vertices of the given connected subgraph will be visited according to breadth first search, also known as burning forest algorithm. The breadth first search algorithm is usually applied when searching the shortest path between two sites in a network. The distance from the root site can be queried. //TODO
bool graphgen::undirected_graph::ibreadth::operator== | ( | ibreadth & | rhs | ) | [inline] |
bool graphgen::undirected_graph::ibreadth::valid | ( | ) | const [inline] |
test iterator validity.
Use this to aviod vertex identifier range violations