annas.graph.util
Class Dijkstra<N,A extends ArcInterface<N>>
java.lang.Object
annas.graph.util.Dijkstra<N,A>
- Type Parameters:
N
- Node typeA
- Arc type
public class Dijkstra<N,A extends ArcInterface<N>>
- extends java.lang.Object
Determines a single source-destination shortest path. Implements the
algorithm described here
- Author:
- Sam Wilson
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Dijkstra
public Dijkstra(GraphInterface<N,A> graph)
execute
public GraphPath<N,DefaultArc<N>> execute(N source,
N destination)
- Executes a single source-destination shortest path search.
- Parameters:
source
- Source nodedestination
- Destination node
- Returns:
- GraphPath of the shortest path