lemon/circulation.h
changeset 2418 89cbf0a2ed57
parent 2391 14a343be7a5a
child 2450 719220885b90
equal deleted inserted replaced
3:4d7e5d7d4625 4:5e237d90744a
   128       return true;
   128       return true;
   129     };
   129     };
   130     ///Check if the default \c x is a feasible circulation
   130     ///Check if the default \c x is a feasible circulation
   131     bool checkX() { return checkX(_x); }
   131     bool checkX() { return checkX(_x); }
   132 
   132 
   133     ///Chech if \c bar is a real barrier
   133     ///Check if \c bar is a real barrier
   134 
   134 
   135     ///Chech if \c bar is a real barrier
   135     ///Check if \c bar is a real barrier
   136     ///\sa barrier()
   136     ///\sa barrier()
   137     template<class GT>
   137     template<class GT>
   138     bool checkBarrier(GT &bar) 
   138     bool checkBarrier(GT &bar) 
   139     {
   139     {
   140       Value delta=0;
   140       Value delta=0;
   148 	  if(bar[s]&&!bar[t]) delta+=_up[e];
   148 	  if(bar[s]&&!bar[t]) delta+=_up[e];
   149 	  else if(bar[t]&&!bar[s]) delta-=_lo[e];
   149 	  else if(bar[t]&&!bar[s]) delta-=_lo[e];
   150 	}
   150 	}
   151       return _tol.negative(delta);
   151       return _tol.negative(delta);
   152     }  
   152     }  
   153     ///Chech whether or not the last execution provides a barrier
   153     ///Check whether or not the last execution provides a barrier
   154 
   154 
   155     ///Chech whether or not the last execution provides a barrier
   155     ///Check whether or not the last execution provides a barrier
   156     ///\sa barrier()
   156     ///\sa barrier()
   157     bool checkBarrier() 
   157     bool checkBarrier() 
   158     {
   158     {
   159       typename Graph:: template NodeMap<bool> bar(_g);
   159       typename Graph:: template NodeMap<bool> bar(_g);
   160       barrier(bar);
   160       barrier(bar);