in src/benchmarks/java/org/apache/commons/graph/shortestpath/UniVsBiDijkstraBenchmarkTestCase.java [161:180]
public void testPerformBidirectionalDijkstra() {
BaseLabeledVertex source = sourceListBi.removeFirst();
BaseLabeledVertex target = targetListBi.removeFirst();
try {
WeightedPath<BaseLabeledVertex, BaseLabeledWeightedEdge<Double>, Double> path =
findShortestPath( graph )
.whereEdgesHaveWeights( new BaseWeightedEdge<Double>() )
.from( source )
.to( target )
.applyingBidirectionalDijkstra( weightOperations );
assertTrue( path.getSize() > 0 );
assertTrue( path.getWeight() > 0D );
}
catch ( Exception e )
{
e.printStackTrace();
}
}