src/lemon/bfs.h
changeset 1131 425731cb66de
parent 977 48962802d168
child 1164 80bb73097736
equal deleted inserted replaced
2:dc24a19b4dbe 3:a129b090c478
   207 	Node m;
   207 	Node m;
   208 	Node n=Q[Qt++];
   208 	Node n=Q[Qt++];
   209 	int d= (*distance)[n]+1;
   209 	int d= (*distance)[n]+1;
   210 	
   210 	
   211 	for(OutEdgeIt e(*G,n);e!=INVALID;++e)
   211 	for(OutEdgeIt e(*G,n);e!=INVALID;++e)
   212 	  if((m=G->head(e))!=s && (*predecessor)[m]==INVALID) {
   212 	  if((m=G->target(e))!=s && (*predecessor)[m]==INVALID) {
   213 	    Q[Qh++]=m;
   213 	    Q[Qh++]=m;
   214 	    predecessor->set(m,e);
   214 	    predecessor->set(m,e);
   215 	    pred_node->set(m,n);
   215 	    pred_node->set(m,n);
   216 	    distance->set(m,d);
   216 	    distance->set(m,d);
   217 	  }
   217 	  }