Class EdgeBasedTarjanSCC

java.lang.Object
com.graphhopper.routing.subnetwork.EdgeBasedTarjanSCC

public class EdgeBasedTarjanSCC extends Object
Edge-based version of Tarjan's algorithm to find strongly connected components on a directed graph. Compared to the more traditional node-based version that traverses the nodes of the graph this version works directly with the edges. This way its possible to take into account possible turn restrictions.

The algorithm is of course very similar to the node-based version and it might be possible to reuse some code between the two, but especially the version with an explicit stack needs different 'state' information and loops required some special treatment as well (this was written when base graph could still have loops!).

Author:
easbar
See Also: