|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcs132.dijkstra.ShortestPath<E>
public class ShortestPath<E>
Perform Dijkstra's algorithm over a weighted, directed graph.
| Constructor Summary | |
|---|---|
ShortestPath(E start,
EdgeModel<E> model)
Perform a shorted path computation. |
|
| Method Summary | |
|---|---|
int |
getMinimumCost(E w)
Return the cost of the minimum cost path from the start element to the designated element. |
java.util.List<? extends E> |
getMinimumCostPath(E w)
Return the path from the start element to the designated element, inclusive. |
java.util.Set<E> |
reachable()
Return the set of elements reachable from the start element. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ShortestPath(E start,
EdgeModel<E> model)
start - Starting elementmodel - An edge model that provides the successor of
each element and the cost from any element to any other element.| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic int getMinimumCost(E w)
w -
public java.util.Set<E> reachable()
public java.util.List<? extends E> getMinimumCostPath(E w)
w - element to which path is desired
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||