in src/main/java/org/apache/commons/graph/shortestpath/DefaultPathSourceSelector.java [128:147]
private void pathReconstruction( PredecessorsList<V, WE, W> path,
V source, V target,
Map<VertexPair<V>, V> next )
{
V k = next.get( new VertexPair<V>( source, target ) );
if ( k == null )
{
// there is a direct path between a and b
WE edge = graph.getEdge( source, target );
if ( edge != null )
{
path.addPredecessor( target, source );
}
}
else
{
pathReconstruction( path, source, k, next );
pathReconstruction( path, k, target, next );
}
}