annas.graph.util
Class Dijkstra<N,A extends ArcInterface<N>>

java.lang.Object
  extended by annas.graph.util.Dijkstra<N,A>
Type Parameters:
N - Node type
A - 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

Constructor Summary
Dijkstra(GraphInterface<N,A> graph)
           
 
Method Summary
 GraphPath<N,DefaultArc<N>> execute(N source, N destination)
          Executes a single source-destination shortest path search.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dijkstra

public Dijkstra(GraphInterface<N,A> graph)
Method Detail

execute

public GraphPath<N,DefaultArc<N>> execute(N source,
                                          N destination)
Executes a single source-destination shortest path search.

Parameters:
source - Source node
destination - Destination node
Returns:
GraphPath of the shortest path