help ... i have a problem withe dijkstra algorthim

:)hi all;

I have the code of the static dijkestra algorithm and i want to converted to be dynamic, but i really got stuck . i have the layout code but i didn't understand it. So any one who has experiance in the Dijkstra algorithm can help me.

this is the static dijkstra algorithm java source:

package DijkstraAlgorithm.src.graphs;

import java.util.Hashtable;

/**

* @author vsutskever

*

*/

public class Dijkstra {

private Graph graph;

//priority queue stores all of the nodes, reachable from the start node

//The queue is sorted by the node.distance

private GraphNodePriorityQueue priorityQ = new GraphNodePriorityQueue();

private Hashtable <GraphNode,Integer> distance = new Hashtable<GraphNode, Integer>();

//1. needs to get the list of all nodes in the graph

//2. need to initialize distance vector to infinity

//3. Need Edge Cost function

public Dijkstra (Graph g){

this.graph = g;

this.graph.getStartNode().setDistance(0);

this.priorityQ.add(this.graph.getAllNodes());

}

/**

* Actual algorithm

*/

public void go(){

while (this.priorityQ.hasMore()){

GraphNode n = this.priorityQ.remove();

for (Edge e: n.getOutGoingEdges()){

GraphNode adjNode = e.getNode();

Integer newPossiblePathCost = e.getCost()+n.getDistance();

if (newPossiblePathCost<adjNode.getDistance()){

adjNode.setDistance(newPossiblePathCost);

this.priorityQ.updateGraphNodeDistance(adjNode);

}

}

}

}

/**

*

*/

public void PrintStatusOfPriorityQ(){

this.priorityQ.PrintContents();

}

}

and this is the layout code for the dynamic:

Dijkstra_Double_Bucket:

INPUTS:

V, the set of nodes in the network

E, the set of arcs in the network

C, max(||e||), "eÎE

s, the source node, sÎV

B, a constant used to determine number of buckets

e.g. largest power of 2 <ÖC

OUTPUTS:

P, the set of parent nodes on shortest paths to nearest

source

VARIABLES:

High, an array of Lists

Low, an array of Lists

let source sÎV have d(s)¬0, S(s)¬labelled

let all other nodes vÎV have d(s)¬¥, S(s)¬unreached

Num¬é(C+1)/Bù

Low: array [0..B] of List

High: array [0..Num] of List

Insert(Low[0],s)

for L in 0 to Num loop

for P in 0 to B loop

while ØEmpty(Low[P]) loop

Scan(Head(Low[P]))

for all {w|(Head(Low[P]),w) Î E Ù S(w)=labelled} loop

if d(w)>((L+1)B - 1) then

/* INSERT IN UPPER BINS */

Insert(High[ëd(w)/Bû],w)

else

/* INSERT IN LOWER BINS */

Insert(Low[d(w) - LB], w)

end if

end loop

Remove(Low[L], Head(Low[L]))

end loop

end loop

end loop

So can any one help me please.....:p