EdgeDirectorypublic class DefaultEdgeDirectory extends 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.
|
Iterator |
getDestinations(Vertex origin) |
Returns an iterator over all valid destinations for a given vertex.
|
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 Iterator getDestinations(Vertex origin)
getDestinations in interface EdgeDirectoryorigin - the origin from which to search for destinationspublic Iterator getEdges(Vertex origin)
origin - the originCopyright © 2018 Apache Software Foundation. All rights reserved.