diff -r abcbdcf36ab2 -r 7949a29a334e src/work/jacint/dijkstra.h --- a/src/work/jacint/dijkstra.h Thu Mar 11 11:03:22 2004 +0000 +++ b/src/work/jacint/dijkstra.h Thu Mar 11 12:55:50 2004 +0000 @@ -2,29 +2,24 @@ /* *template * - * *Constructor: * *Dijkstra(Graph G, NodeIt s, Graph::EdgeMap length) * * - * *Member functions: * *void run() * * The following function should be used after run() was already run. * - * *T dist(NodeIt v) : returns the distance from s to v. * It is 0 if v is not reachable from s. * - * *EdgeIt pred(NodeIt v) : returns the last edge * of a shortest s-v path. Returns an invalid iterator * if v=s or v is not reachable from s. * - * *bool reach(NodeIt v) : true iff v is reachable from s * */ @@ -76,9 +71,9 @@ NodeIt v=heap.top(); T oldvalue=heap.get(v); + heap.pop(); distance.set(v, oldvalue); - heap.pop(); - + OutEdgeIt e; for( G.getFirst(e,v); G.valid(e); G.next(e)) { NodeIt w=G.bNode(e); @@ -88,7 +83,6 @@ reached.set(w,true); heap.push(w,oldvalue+length.get(e)); predecessor.set(w,e); - } else if ( oldvalue+length.get(e) < heap.get(w) ) { predecessor.set(w,e); heap.decrease(w, oldvalue+length.get(e)); @@ -114,9 +108,9 @@ bool reach(NodeIt v) { return reached.get(v); } - + }; - + } #endif