Template Function ADS::bfsOrder

Function Documentation

template<class W>
std::vector<int> ADS::bfsOrder(const StaticGraph<W> &g, int r = 0)

the order of a visit in breadth from r, then from the least node not reached, and so on: the name p[ u ] of each node u in the relabelled graph, a permutation of the nodes

Pre:

r is a node, or the graph has none