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.


Variable Index

 o distances
 o locators
 o weights

Constructor Index

 o MyDijkstra()

Method Index

 o distance(Vertex)
 o distances()
Gets the vertex distances.
 o getLocator(Vertex)
Gets the locator of a vertex in the priority queue.
 o init()
Initializes Dijkstra's algorithm.
 o initPQ(Comparator)
Initializes an empty priority queue.
 o setDistance(Vertex, int)
Sets the distance to reach a vertex from it origin.
 o setLocator(Vertex, Locator)
Sets the locator of a vertex in the priority queue.
 o setWeight(Edge, int)
 o weight(Edge)
Returns the weight of an edge.

Variables

 o locators
 protected Hashtable locators
 o distances
 protected Hashtable distances
 o weights
 protected Hashtable weights

Constructors

 o MyDijkstra
 public MyDijkstra()

Methods

 o init
 public void init()
Initializes Dijkstra's algorithm.

Overrides:
init in class Dijkstra
 o initPQ
 public PriorityQueue initPQ(Comparator comp)
Initializes an empty priority queue.

Overrides:
initPQ in class Dijkstra
 o weight
 public int weight(Edge e)
Returns the weight of an edge.

Overrides:
weight in class Dijkstra
 o setWeight
 public void setWeight(Edge e,
                       int w)
 o setLocator
 public void setLocator(Vertex u,
                        Locator loc)
Sets the locator of a vertex in the priority queue.

Overrides:
setLocator in class Dijkstra
 o getLocator
 public Locator getLocator(Vertex u)
Gets the locator of a vertex in the priority queue.

Overrides:
getLocator in class Dijkstra
 o setDistance
 public void setDistance(Vertex u,
                         int dist)
Sets the distance to reach a vertex from it origin.

Overrides:
setDistance in class Dijkstra
 o distance
 public int distance(Vertex u)
 o distances
 public Object distances()
Gets the vertex distances.

Overrides:
distances in class Dijkstra

All Packages  Class Hierarchy  This Package  Previous  Next  Index