Template Function ADS::longestPathLayering

Function Documentation

template<Graph G>
std::vector<int> ADS::longestPathLayering(const G &g)

longestPathLayering(): the edges of a longest path ending at each node of the acyclic graph, 0 on the sources (and on the names that are not nodes)

Pre:

the graph is acyclic

Post:

each edge ( u , v ) has layer[ v ] > layer[ u ], and each node of a positive layer a predecessor in the layer before (audit)