src/lemon/max_matching.h
changeset 1158 29961fa390a3
parent 1093 31834bad3e84
child 1164 80bb73097736
     1.1 --- a/src/lemon/max_matching.h	Sat Feb 19 21:11:20 2005 +0000
     1.2 +++ b/src/lemon/max_matching.h	Sun Feb 20 01:02:07 2005 +0000
     1.3 @@ -180,7 +180,7 @@
     1.4  	if ( todo[v] && _mate[v]!=INVALID ) {
     1.5  	  Node u=_mate[v];
     1.6  	  for(IncEdgeIt e(g,v); e!=INVALID; ++e) {
     1.7 -	    if ( g.target(e) == u ) {
     1.8 +	    if ( g.runningNode(e) == u ) {
     1.9  	      map.set(u,e);
    1.10  	      map.set(v,e);
    1.11  	      todo.set(u,false);
    1.12 @@ -227,7 +227,7 @@
    1.13  	if ( todo[v] && _mate[v]!=INVALID ) {
    1.14  	  Node u=_mate[v];
    1.15  	  for(IncEdgeIt e(g,v); e!=INVALID; ++e) {
    1.16 -	    if ( g.target(e) == u ) {
    1.17 +	    if ( g.runningNode(e) == u ) {
    1.18  	      map.set(e,true);
    1.19  	      todo.set(u,false);
    1.20  	      todo.set(v,false);
    1.21 @@ -332,7 +332,7 @@
    1.22        R.pop();
    1.23  	
    1.24        for( IncEdgeIt e(g,x); e!=INVALID ; ++e ) {
    1.25 -	Node y=g.target(e);
    1.26 +	Node y=g.runningNode(e);
    1.27  
    1.28  	if ( position[y] == D && blossom.find(x) != blossom.find(y) ) { 
    1.29  	  //x and y must be in the same tree
    1.30 @@ -388,7 +388,7 @@
    1.31        Q.pop();
    1.32  	
    1.33        for( IncEdgeIt e(g,x); e!=INVALID; ++e ) {
    1.34 -	Node y=g.target(e);
    1.35 +	Node y=g.runningNode(e);
    1.36  	      
    1.37  	switch ( position[y] ) {
    1.38  	case D:          //x and y must be in the same tree
    1.39 @@ -453,7 +453,7 @@
    1.40      for(NodeIt v(g); v!=INVALID; ++v)
    1.41        if ( _mate[v]==INVALID ) {
    1.42  	for( IncEdgeIt e(g,v); e!=INVALID ; ++e ) {
    1.43 -	  Node y=g.target(e);
    1.44 +	  Node y=g.runningNode(e);
    1.45  	  if ( _mate[y]==INVALID && y!=v ) {
    1.46  	    _mate.set(v,y);
    1.47  	    _mate.set(y,v);
    1.48 @@ -484,7 +484,7 @@
    1.49    bool MaxMatching<Graph>::noShrinkStep(Node x, typename Graph::NodeMap<Node>& ear,  
    1.50  					UFE& blossom, UFE& tree, std::queue<Node>& Q) {
    1.51      for( IncEdgeIt e(g,x); e!= INVALID; ++e ) {
    1.52 -      Node y=g.target(e);
    1.53 +      Node y=g.runningNode(e);
    1.54  	
    1.55        if ( position[y]==C ) {
    1.56  	if ( _mate[y]!=INVALID ) {       //grow