public class ShortestPath extends Object
Object.equals(java.lang.Object)
and Object.hashCode()
) other necessary
information is obtained through a special interface ShortestPath.Graph
implemented by the caller to
enumerate edges and compute weights.Modifier and Type | Class and Description |
---|---|
static interface |
ShortestPath.Graph<T,V>
A caller must implement this interface to provide the information needed to define the
graph and compute the shortest path.
|
Constructor and Description |
---|
ShortestPath() |
Modifier and Type | Method and Description |
---|---|
static <T,V> List<V> |
compute(ShortestPath.Graph<T,V> graph,
T start,
T end)
Computes the shortest path between the specified starting and ending nodes using Dijkstra's
algorithm.
|
public static <T,V> List<V> compute(ShortestPath.Graph<T,V> graph, T start, T end)
Copyright © 2015. All rights reserved.