EdgeDirectorypublic class DefaultEdgeDirectory extends java.lang.Object implements EdgeDirectory
DijkstraAlgorithm.| Constructor | Description |
|---|---|
DefaultEdgeDirectory() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addEdge(Edge edge) |
Adds a new edge between two vertices.
|
Edge |
getBestEdge(Vertex start,
Vertex end) |
Returns the best edge (the edge with the lowest penalty) between two given vertices.
|
java.util.Iterator |
getDestinations(Vertex origin) |
Returns an iterator over all valid destinations for a given vertex.
|
java.util.Iterator |
getEdges(Vertex origin) |
Returns an iterator over all edges with the given origin.
|
int |
getPenalty(Vertex start,
Vertex end) |
Returns the penalty between two vertices.
|
public void addEdge(Edge edge)
edge - the new edgepublic int getPenalty(Vertex start, Vertex end)
getPenalty in interface EdgeDirectorystart - the start vertexend - the end vertexpublic java.util.Iterator getDestinations(Vertex origin)
getDestinations in interface EdgeDirectoryorigin - the origin from which to search for destinationspublic java.util.Iterator getEdges(Vertex origin)
origin - the originCopyright 1999-2018 The Apache Software Foundation. All Rights Reserved.