All Packages Class Hierarchy This Package Previous Next Index
Class jdsl.core.algo.weightedgraphs.MyDijkstra
java.lang.Object
|
+----jdsl.core.algo.weightedgraphs.Dijkstra
|
+----jdsl.core.algo.weightedgraphs.MyDijkstra
- public class MyDijkstra
- extends Dijkstra
A specialization of the template Dijkstra's algorithm. Overrides various
methods of the superclass to give this implementation functionality.
-
distances
-
-
locators
-
-
weights
-
-
MyDijkstra()
-
-
distance(Vertex)
-
-
distances()
- Gets the vertex distances.
-
getLocator(Vertex)
- Gets the locator of a vertex in the priority queue.
-
init()
- Initializes Dijkstra's algorithm.
-
initPQ(Comparator)
- Initializes an empty priority queue.
-
setDistance(Vertex, int)
- Sets the distance to reach a vertex from it origin.
-
setLocator(Vertex, Locator)
- Sets the locator of a vertex in the priority queue.
-
setWeight(Edge, int)
-
-
weight(Edge)
- Returns the weight of an edge.
locators
protected Hashtable locators
distances
protected Hashtable distances
weights
protected Hashtable weights
MyDijkstra
public MyDijkstra()
init
public void init()
- Initializes Dijkstra's algorithm.
- Overrides:
- init in class Dijkstra
initPQ
public PriorityQueue initPQ(Comparator comp)
- Initializes an empty priority queue.
- Overrides:
- initPQ in class Dijkstra
weight
public int weight(Edge e)
- Returns the weight of an edge.
- Overrides:
- weight in class Dijkstra
setWeight
public void setWeight(Edge e,
int w)
setLocator
public void setLocator(Vertex u,
Locator loc)
- Sets the locator of a vertex in the priority queue.
- Overrides:
- setLocator in class Dijkstra
getLocator
public Locator getLocator(Vertex u)
- Gets the locator of a vertex in the priority queue.
- Overrides:
- getLocator in class Dijkstra
setDistance
public void setDistance(Vertex u,
int dist)
- Sets the distance to reach a vertex from it origin.
- Overrides:
- setDistance in class Dijkstra
distance
public int distance(Vertex u)
distances
public Object distances()
- Gets the vertex distances.
- Overrides:
- distances in class Dijkstra
All Packages Class Hierarchy This Package Previous Next Index