src/work/jacint/dijkstra.h
changeset 174 44700ed9ffaa
parent 170 9091b1ebca27
child 211 9222a9b8b323
equal deleted inserted replaced
3:772b65444964 4:cf74bcd59fe9
    75 
    75 
    76 	  NodeIt v=heap.top(); 
    76 	  NodeIt v=heap.top(); 
    77 	  T oldvalue=heap.get(v);
    77 	  T oldvalue=heap.get(v);
    78 	  heap.pop();
    78 	  heap.pop();
    79 	  distance.set(v, oldvalue);
    79 	  distance.set(v, oldvalue);
       
    80 	  scanned.set(v,true);
    80 
    81 
    81 	  OutEdgeIt e;
    82 	  OutEdgeIt e;
    82 	  for( G.getFirst(e,v); G.valid(e); G.next(e)) {
    83 	  for( G.getFirst(e,v); G.valid(e); G.next(e)) {
    83 	    NodeIt w=G.bNode(e); 
    84 	    NodeIt w=G.bNode(e); 
    84 	    
    85 	    
    91 		predecessor.set(w,e);
    92 		predecessor.set(w,e);
    92 		heap.decrease(w, oldvalue+length.get(e)); 
    93 		heap.decrease(w, oldvalue+length.get(e)); 
    93 	      }
    94 	      }
    94 	    }
    95 	    }
    95 	  }
    96 	  }
    96 	  scanned.set(v,true);
       
    97 	}
    97 	}
    98       } 
    98       } 
    99       
    99       
   100 
   100 
   101       T dist(NodeIt v) {
   101       T dist(NodeIt v) {