org.apache.commons.graph.shortestpath
Class Dijkstra

java.lang.Object
  extended by org.apache.commons.graph.shortestpath.Dijkstra

public final class Dijkstra
extends Object


Method Summary
static
<V extends Vertex,WE extends WeightedEdge<V>>
WeightedPath<V,WE>
findShortestPath(WeightedGraph<V,WE> graph, V source, V target)
          Applies the classical Dijkstra algorithm to find the shortest path from the source to the target, if exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findShortestPath

public static <V extends Vertex,WE extends WeightedEdge<V>> WeightedPath<V,WE> findShortestPath(WeightedGraph<V,WE> graph,
                                                                                                V source,
                                                                                                V target)
Applies the classical Dijkstra algorithm to find the shortest path from the source to the target, if exists.

Type Parameters:
V -
WE -
Parameters:
graph -
source -
target -
Returns:


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.