public class DijkstraAlgorithm
extends java.lang.Object
Constructor and Description |
---|
DijkstraAlgorithm()
Instantiate.
|
Modifier and Type | Method and Description |
---|---|
Token[] |
callDijkstra(java.util.Map<java.lang.Integer,ArrayToken> neighbors,
java.util.ArrayList<java.lang.Integer> airportsId,
int source,
int destination,
java.util.Map<java.lang.Integer,Token> stormyTracks,
java.util.Map<java.lang.Integer,java.lang.Boolean> inTransit)
Call the Dijkstra algorithm.
|
void |
execute(Vertex source)
Execute the Dijkstra algorithm.
|
java.util.LinkedList<Vertex> |
getPath(Vertex target)
Return the path from the source to the selected target.
|
public void execute(Vertex source)
source
- The source id.public Token[] callDijkstra(java.util.Map<java.lang.Integer,ArrayToken> neighbors, java.util.ArrayList<java.lang.Integer> airportsId, int source, int destination, java.util.Map<java.lang.Integer,Token> stormyTracks, java.util.Map<java.lang.Integer,java.lang.Boolean> inTransit)
neighbors
- The map of neighbors.airportsId
- The airportssource
- The sourcedestination
- The destinationstormyTracks
- The map of storm tracks.inTransit
- the map of in transit objects.