src/work/jacint/max_matching.cc
changeset 1282 81e89e2b90d1
parent 921 818510fa3d99
equal deleted inserted replaced
1:140597000bdb 2:c3b12e47eb56
   188 
   188 
   189   std::cout<<"Checking if there is no edge between D and C...";
   189   std::cout<<"Checking if there is no edge between D and C...";
   190   bool noedge=true;
   190   bool noedge=true;
   191   EdgeIt e;
   191   EdgeIt e;
   192   for(G.first(e); G.valid(e); G.next(e) ) {
   192   for(G.first(e); G.valid(e); G.next(e) ) {
   193     if ( (pos[G.head(e)]==max_matching.C && pos[G.tail(e)]==max_matching.D) || 
   193     if ( (pos[G.target(e)]==max_matching.C && pos[G.source(e)]==max_matching.D) || 
   194 	 (pos[G.head(e)]==max_matching.D && pos[G.tail(e)]==max_matching.C) )
   194 	 (pos[G.target(e)]==max_matching.D && pos[G.source(e)]==max_matching.C) )
   195       noedge=false; 
   195       noedge=false; 
   196   }
   196   }
   197   if ( noedge ) std::cout<<"OK"<<std::endl;
   197   if ( noedge ) std::cout<<"OK"<<std::endl;
   198   else std::cout<< "There are edges between D and C!"<< std::endl;
   198   else std::cout<< "There are edges between D and C!"<< std::endl;
   199   noerror = noerror && noedge;
   199   noerror = noerror && noedge;