test/edge_set_test.cc
branch1.2
changeset 1277 e13061207f85
parent 1159 7fdaa05a69a1
parent 1257 3e711ee55d31
child 1270 dceba191c00d
equal deleted inserted replaced
6:5c612a894a36 9:32b6cf4f161a
    42   Digraph::Node
    42   Digraph::Node
    43     n1 = digraph.addNode(),
    43     n1 = digraph.addNode(),
    44     n2 = digraph.addNode();
    44     n2 = digraph.addNode();
    45 
    45 
    46   Digraph::Arc ga1 = digraph.addArc(n1, n2);
    46   Digraph::Arc ga1 = digraph.addArc(n1, n2);
    47   ignore_unused_variable_warning(ga1);
    47   ::lemon::ignore_unused_variable_warning(ga1);
    48 
    48 
    49   ArcSet arc_set(digraph);
    49   ArcSet arc_set(digraph);
    50 
    50 
    51   Digraph::Arc ga2 = digraph.addArc(n2, n1);
    51   Digraph::Arc ga2 = digraph.addArc(n2, n1);
    52   ignore_unused_variable_warning(ga2);
    52   ::lemon::ignore_unused_variable_warning(ga2);
    53 
    53 
    54   checkGraphNodeList(arc_set, 2);
    54   checkGraphNodeList(arc_set, 2);
    55   checkGraphArcList(arc_set, 0);
    55   checkGraphArcList(arc_set, 0);
    56 
    56 
    57   Digraph::Node
    57   Digraph::Node
    75   checkGraphConArcList(arc_set, 1);
    75   checkGraphConArcList(arc_set, 1);
    76 
    76 
    77   ArcSet::Arc a2 = arc_set.addArc(n2, n1),
    77   ArcSet::Arc a2 = arc_set.addArc(n2, n1),
    78     a3 = arc_set.addArc(n2, n3),
    78     a3 = arc_set.addArc(n2, n3),
    79     a4 = arc_set.addArc(n2, n3);
    79     a4 = arc_set.addArc(n2, n3);
    80   ignore_unused_variable_warning(a2,a3,a4);
    80   ::lemon::ignore_unused_variable_warning(a2,a3,a4);
    81 
    81 
    82   checkGraphNodeList(arc_set, 3);
    82   checkGraphNodeList(arc_set, 3);
    83   checkGraphArcList(arc_set, 4);
    83   checkGraphArcList(arc_set, 4);
    84 
    84 
    85   checkGraphOutArcList(arc_set, n1, 1);
    85   checkGraphOutArcList(arc_set, n1, 1);
   112   Digraph::Node
   112   Digraph::Node
   113     n1 = digraph.addNode(),
   113     n1 = digraph.addNode(),
   114     n2 = digraph.addNode();
   114     n2 = digraph.addNode();
   115 
   115 
   116   Digraph::Arc ga1 = digraph.addArc(n1, n2);
   116   Digraph::Arc ga1 = digraph.addArc(n1, n2);
   117   ignore_unused_variable_warning(ga1);
   117   ::lemon::ignore_unused_variable_warning(ga1);
   118 
   118 
   119   ArcSet arc_set(digraph);
   119   ArcSet arc_set(digraph);
   120 
   120 
   121   Digraph::Arc ga2 = digraph.addArc(n2, n1);
   121   Digraph::Arc ga2 = digraph.addArc(n2, n1);
   122   ignore_unused_variable_warning(ga2);
   122   ::lemon::ignore_unused_variable_warning(ga2);
   123 
   123 
   124   checkGraphNodeList(arc_set, 2);
   124   checkGraphNodeList(arc_set, 2);
   125   checkGraphArcList(arc_set, 0);
   125   checkGraphArcList(arc_set, 0);
   126 
   126 
   127   Digraph::Node
   127   Digraph::Node
   145   checkGraphConArcList(arc_set, 1);
   145   checkGraphConArcList(arc_set, 1);
   146 
   146 
   147   ArcSet::Arc a2 = arc_set.addArc(n2, n1),
   147   ArcSet::Arc a2 = arc_set.addArc(n2, n1),
   148     a3 = arc_set.addArc(n2, n3),
   148     a3 = arc_set.addArc(n2, n3),
   149     a4 = arc_set.addArc(n2, n3);
   149     a4 = arc_set.addArc(n2, n3);
   150   ignore_unused_variable_warning(a2,a3,a4);
   150   ::lemon::ignore_unused_variable_warning(a2,a3,a4);
   151 
   151 
   152   checkGraphNodeList(arc_set, 3);
   152   checkGraphNodeList(arc_set, 3);
   153   checkGraphArcList(arc_set, 4);
   153   checkGraphArcList(arc_set, 4);
   154 
   154 
   155   checkGraphOutArcList(arc_set, n1, 1);
   155   checkGraphOutArcList(arc_set, n1, 1);
   196   Digraph::Node
   196   Digraph::Node
   197     n1 = digraph.addNode(),
   197     n1 = digraph.addNode(),
   198     n2 = digraph.addNode();
   198     n2 = digraph.addNode();
   199 
   199 
   200   Digraph::Arc ga1 = digraph.addArc(n1, n2);
   200   Digraph::Arc ga1 = digraph.addArc(n1, n2);
   201   ignore_unused_variable_warning(ga1);
   201   ::lemon::ignore_unused_variable_warning(ga1);
   202 
   202 
   203   EdgeSet edge_set(digraph);
   203   EdgeSet edge_set(digraph);
   204 
   204 
   205   Digraph::Arc ga2 = digraph.addArc(n2, n1);
   205   Digraph::Arc ga2 = digraph.addArc(n2, n1);
   206   ignore_unused_variable_warning(ga2);
   206   ::lemon::ignore_unused_variable_warning(ga2);
   207 
   207 
   208   checkGraphNodeList(edge_set, 2);
   208   checkGraphNodeList(edge_set, 2);
   209   checkGraphArcList(edge_set, 0);
   209   checkGraphArcList(edge_set, 0);
   210   checkGraphEdgeList(edge_set, 0);
   210   checkGraphEdgeList(edge_set, 0);
   211 
   211 
   238   checkGraphConArcList(edge_set, 2);
   238   checkGraphConArcList(edge_set, 2);
   239 
   239 
   240   EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   240   EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   241     e3 = edge_set.addEdge(n2, n3),
   241     e3 = edge_set.addEdge(n2, n3),
   242     e4 = edge_set.addEdge(n2, n3);
   242     e4 = edge_set.addEdge(n2, n3);
   243   ignore_unused_variable_warning(e2,e3,e4);
   243   ::lemon::ignore_unused_variable_warning(e2,e3,e4);
   244 
   244 
   245   checkGraphNodeList(edge_set, 3);
   245   checkGraphNodeList(edge_set, 3);
   246   checkGraphEdgeList(edge_set, 4);
   246   checkGraphEdgeList(edge_set, 4);
   247 
   247 
   248   checkGraphOutArcList(edge_set, n1, 2);
   248   checkGraphOutArcList(edge_set, n1, 2);
   284   Digraph::Node
   284   Digraph::Node
   285     n1 = digraph.addNode(),
   285     n1 = digraph.addNode(),
   286     n2 = digraph.addNode();
   286     n2 = digraph.addNode();
   287 
   287 
   288   Digraph::Arc ga1 = digraph.addArc(n1, n2);
   288   Digraph::Arc ga1 = digraph.addArc(n1, n2);
   289   ignore_unused_variable_warning(ga1);
   289   ::lemon::ignore_unused_variable_warning(ga1);
   290 
   290 
   291   EdgeSet edge_set(digraph);
   291   EdgeSet edge_set(digraph);
   292 
   292 
   293   Digraph::Arc ga2 = digraph.addArc(n2, n1);
   293   Digraph::Arc ga2 = digraph.addArc(n2, n1);
   294   ignore_unused_variable_warning(ga2);
   294   ::lemon::ignore_unused_variable_warning(ga2);
   295 
   295 
   296   checkGraphNodeList(edge_set, 2);
   296   checkGraphNodeList(edge_set, 2);
   297   checkGraphArcList(edge_set, 0);
   297   checkGraphArcList(edge_set, 0);
   298   checkGraphEdgeList(edge_set, 0);
   298   checkGraphEdgeList(edge_set, 0);
   299 
   299 
   326   checkGraphConArcList(edge_set, 2);
   326   checkGraphConArcList(edge_set, 2);
   327 
   327 
   328   EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   328   EdgeSet::Edge e2 = edge_set.addEdge(n2, n1),
   329     e3 = edge_set.addEdge(n2, n3),
   329     e3 = edge_set.addEdge(n2, n3),
   330     e4 = edge_set.addEdge(n2, n3);
   330     e4 = edge_set.addEdge(n2, n3);
   331   ignore_unused_variable_warning(e2,e3,e4);
   331   ::lemon::ignore_unused_variable_warning(e2,e3,e4);
   332 
   332 
   333   checkGraphNodeList(edge_set, 3);
   333   checkGraphNodeList(edge_set, 3);
   334   checkGraphEdgeList(edge_set, 4);
   334   checkGraphEdgeList(edge_set, 4);
   335 
   335 
   336   checkGraphOutArcList(edge_set, n1, 2);
   336   checkGraphOutArcList(edge_set, n1, 2);