public class DijkstraPathFinderOptimal
extends java.lang.Object
| Constructor and Description |
|---|
DijkstraPathFinderOptimal(int[] okMapNodes)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Double |
getShortestDistance(MapNode from,
MapNode to)
Return the distance between two map nodes, compute Dijkstra if necessary
|
java.util.List<MapNode> |
getShortestPath(MapNode from,
MapNode to)
Finds and returns a shortest path between two map nodes
|
void |
setHost(DTNHost host)
Sets the host
|
public DijkstraPathFinderOptimal(int[] okMapNodes)
okMapNodes - The map node types that are OK for paths or null if all nodes
are OKpublic java.util.List<MapNode> getShortestPath(MapNode from, MapNode to)
from - The source of the pathto - The destination of the pathpublic java.lang.Double getShortestDistance(MapNode from, MapNode to)
from - The source of the pathto - The destination of the pathpublic void setHost(DTNHost host)
host - Host