Template Function ADS::reachesNegativeCycle

Function Documentation

template<Graph G>
bool ADS::reachesNegativeCycle(const G &g, int r)

whether a negative cycle is reachable from r, by Bellman-Ford, O( n m )