test/max_matching_test.cc
changeset 1914 7ef30a71937f
parent 1875 98698b69a902
child 1956 a055123339d5
equal deleted inserted replaced
2:82913577f3d8 3:bb5d2e3855cd
    29 using namespace std;
    29 using namespace std;
    30 using namespace lemon;
    30 using namespace lemon;
    31 
    31 
    32 int main() {
    32 int main() {
    33 
    33 
    34   typedef UndirListGraph Graph;
    34   typedef ListUGraph Graph;
    35 
    35 
    36   typedef Graph::Edge Edge;
    36   typedef Graph::Edge Edge;
    37   typedef Graph::UndirEdgeIt UndirEdgeIt;
    37   typedef Graph::UEdgeIt UEdgeIt;
    38   typedef Graph::IncEdgeIt IncEdgeIt;
    38   typedef Graph::IncEdgeIt IncEdgeIt;
    39   typedef Graph::NodeIt NodeIt;
    39   typedef Graph::NodeIt NodeIt;
    40   typedef Graph::Node Node;
    40   typedef Graph::Node Node;
    41    
    41    
    42   Graph g;
    42   Graph g;
   136     }
   136     }
   137   }
   137   }
   138   check ( coincide, "The decompositions do not coincide! " );
   138   check ( coincide, "The decompositions do not coincide! " );
   139 
   139 
   140   bool noedge=true;
   140   bool noedge=true;
   141   for(UndirEdgeIt e(g); e!=INVALID; ++e) {
   141   for(UEdgeIt e(g); e!=INVALID; ++e) {
   142    if ( (pos[g.target(e)]==max_matching.C && pos[g.source(e)]==max_matching.D) || 
   142    if ( (pos[g.target(e)]==max_matching.C && pos[g.source(e)]==max_matching.D) || 
   143 	 (pos[g.target(e)]==max_matching.D && pos[g.source(e)]==max_matching.C) )
   143 	 (pos[g.target(e)]==max_matching.D && pos[g.source(e)]==max_matching.C) )
   144       noedge=false; 
   144       noedge=false; 
   145   }
   145   }
   146   check ( noedge, "There are edges between D and C!" );
   146   check ( noedge, "There are edges between D and C!" );