test/adaptors_test.cc
changeset 1427 57abff252556
parent 1270 dceba191c00d
equal deleted inserted replaced
10:99e2a0a0322b 11:32b0262a0a6d
   143   checkGraphNodeMap(digraph);
   143   checkGraphNodeMap(digraph);
   144   checkGraphArcMap(digraph);
   144   checkGraphArcMap(digraph);
   145 
   145 
   146   // Check the conversion of nodes and arcs
   146   // Check the conversion of nodes and arcs
   147   Digraph::Node nd = n4;
   147   Digraph::Node nd = n4;
       
   148   ::lemon::ignore_unused_variable_warning(nd);
   148   nd = n4;
   149   nd = n4;
   149   Adaptor::Node na = n1;
   150   Adaptor::Node na = n1;
       
   151   ::lemon::ignore_unused_variable_warning(na);
   150   na = n2;
   152   na = n2;
   151   Digraph::Arc ad = a4;
   153   Digraph::Arc ad = a4;
       
   154   ::lemon::ignore_unused_variable_warning(ad);
   152   ad = a5;
   155   ad = a5;
   153   Adaptor::Arc aa = a1;
   156   Adaptor::Arc aa = a1;
       
   157   ::lemon::ignore_unused_variable_warning(aa);
   154   aa = a2;
   158   aa = a2;
   155 }
   159 }
   156 
   160 
   157 void checkSubDigraph() {
   161 void checkSubDigraph() {
   158   // Check concepts
   162   // Check concepts
   267   checkGraphNodeMap(adaptor);
   271   checkGraphNodeMap(adaptor);
   268   checkGraphArcMap(adaptor);
   272   checkGraphArcMap(adaptor);
   269 
   273 
   270   // Check the conversion of nodes and arcs
   274   // Check the conversion of nodes and arcs
   271   Digraph::Node nd = n3;
   275   Digraph::Node nd = n3;
       
   276   ::lemon::ignore_unused_variable_warning(nd);
   272   nd = n3;
   277   nd = n3;
   273   Adaptor::Node na = n1;
   278   Adaptor::Node na = n1;
       
   279   ::lemon::ignore_unused_variable_warning(na);
   274   na = n2;
   280   na = n2;
   275   Digraph::Arc ad = a3;
   281   Digraph::Arc ad = a3;
       
   282   ::lemon::ignore_unused_variable_warning(ad);
   276   ad = a3;
   283   ad = a3;
   277   Adaptor::Arc aa = a1;
   284   Adaptor::Arc aa = a1;
       
   285   ::lemon::ignore_unused_variable_warning(aa);
   278   aa = a2;
   286   aa = a2;
   279 }
   287 }
   280 
   288 
   281 void checkFilterNodes1() {
   289 void checkFilterNodes1() {
   282   // Check concepts
   290   // Check concepts
   363   checkGraphNodeMap(adaptor);
   371   checkGraphNodeMap(adaptor);
   364   checkGraphArcMap(adaptor);
   372   checkGraphArcMap(adaptor);
   365 
   373 
   366   // Check the conversion of nodes and arcs
   374   // Check the conversion of nodes and arcs
   367   Digraph::Node nd = n3;
   375   Digraph::Node nd = n3;
       
   376   ::lemon::ignore_unused_variable_warning(nd);
   368   nd = n3;
   377   nd = n3;
   369   Adaptor::Node na = n1;
   378   Adaptor::Node na = n1;
       
   379   ::lemon::ignore_unused_variable_warning(na);
   370   na = n2;
   380   na = n2;
   371   Digraph::Arc ad = a3;
   381   Digraph::Arc ad = a3;
       
   382   ::lemon::ignore_unused_variable_warning(ad);
   372   ad = a3;
   383   ad = a3;
   373   Adaptor::Arc aa = a1;
   384   Adaptor::Arc aa = a1;
       
   385   ::lemon::ignore_unused_variable_warning(aa);
   374   aa = a2;
   386   aa = a2;
   375 }
   387 }
   376 
   388 
   377 void checkFilterArcs() {
   389 void checkFilterArcs() {
   378   // Check concepts
   390   // Check concepts
   461   checkGraphNodeMap(adaptor);
   473   checkGraphNodeMap(adaptor);
   462   checkGraphArcMap(adaptor);
   474   checkGraphArcMap(adaptor);
   463 
   475 
   464   // Check the conversion of nodes and arcs
   476   // Check the conversion of nodes and arcs
   465   Digraph::Node nd = n3;
   477   Digraph::Node nd = n3;
       
   478   ::lemon::ignore_unused_variable_warning(nd);
   466   nd = n3;
   479   nd = n3;
   467   Adaptor::Node na = n1;
   480   Adaptor::Node na = n1;
       
   481   ::lemon::ignore_unused_variable_warning(na);
   468   na = n2;
   482   na = n2;
   469   Digraph::Arc ad = a3;
   483   Digraph::Arc ad = a3;
       
   484   ::lemon::ignore_unused_variable_warning(ad);
   470   ad = a3;
   485   ad = a3;
   471   Adaptor::Arc aa = a1;
   486   Adaptor::Arc aa = a1;
       
   487   ::lemon::ignore_unused_variable_warning(aa);
   472   aa = a2;
   488   aa = a2;
   473 }
   489 }
   474 
   490 
   475 void checkUndirector() {
   491 void checkUndirector() {
   476   // Check concepts
   492   // Check concepts
   572     }
   588     }
   573   }
   589   }
   574 
   590 
   575   // Check the conversion of nodes and arcs/edges
   591   // Check the conversion of nodes and arcs/edges
   576   Digraph::Node nd = n3;
   592   Digraph::Node nd = n3;
       
   593   ::lemon::ignore_unused_variable_warning(nd);
   577   nd = n3;
   594   nd = n3;
   578   Adaptor::Node na = n1;
   595   Adaptor::Node na = n1;
       
   596   ::lemon::ignore_unused_variable_warning(na);
   579   na = n2;
   597   na = n2;
   580   Digraph::Arc ad = e3;
   598   Digraph::Arc ad = e3;
       
   599   ::lemon::ignore_unused_variable_warning(ad);
   581   ad = e3;
   600   ad = e3;
   582   Adaptor::Edge ea = a1;
   601   Adaptor::Edge ea = a1;
       
   602   ::lemon::ignore_unused_variable_warning(ea);
   583   ea = a2;
   603   ea = a2;
   584 }
   604 }
   585 
   605 
   586 void checkResidualDigraph() {
   606 void checkResidualDigraph() {
   587   // Check concepts
   607   // Check concepts
   732           "Wrong forward() or backward()");
   752           "Wrong forward() or backward()");
   733   }
   753   }
   734 
   754 
   735   // Check the conversion of nodes and arcs
   755   // Check the conversion of nodes and arcs
   736   Digraph::Node nd = Adaptor::NodeIt(adaptor);
   756   Digraph::Node nd = Adaptor::NodeIt(adaptor);
       
   757   ::lemon::ignore_unused_variable_warning(nd);
   737   nd = ++Adaptor::NodeIt(adaptor);
   758   nd = ++Adaptor::NodeIt(adaptor);
   738   Adaptor::Node na = n1;
   759   Adaptor::Node na = n1;
       
   760   ::lemon::ignore_unused_variable_warning(na);
   739   na = n2;
   761   na = n2;
   740   Digraph::Arc ad = Adaptor::ArcIt(adaptor);
   762   Digraph::Arc ad = Adaptor::ArcIt(adaptor);
       
   763   ::lemon::ignore_unused_variable_warning(ad);
   741   ad = ++Adaptor::ArcIt(adaptor);
   764   ad = ++Adaptor::ArcIt(adaptor);
   742 }
   765 }
   743 
   766 
   744 void checkSplitNodes() {
   767 void checkSplitNodes() {
   745   // Check concepts
   768   // Check concepts
   985   checkGraphArcMap(adaptor);
  1008   checkGraphArcMap(adaptor);
   986   checkGraphEdgeMap(adaptor);
  1009   checkGraphEdgeMap(adaptor);
   987 
  1010 
   988   // Check the conversion of nodes and edges
  1011   // Check the conversion of nodes and edges
   989   Graph::Node ng = n3;
  1012   Graph::Node ng = n3;
       
  1013   ::lemon::ignore_unused_variable_warning(ng);
   990   ng = n4;
  1014   ng = n4;
   991   Adaptor::Node na = n1;
  1015   Adaptor::Node na = n1;
       
  1016   ::lemon::ignore_unused_variable_warning(na);
   992   na = n2;
  1017   na = n2;
   993   Graph::Edge eg = e3;
  1018   Graph::Edge eg = e3;
       
  1019   ::lemon::ignore_unused_variable_warning(eg);
   994   eg = e4;
  1020   eg = e4;
   995   Adaptor::Edge ea = e1;
  1021   Adaptor::Edge ea = e1;
       
  1022   ::lemon::ignore_unused_variable_warning(ea);
   996   ea = e2;
  1023   ea = e2;
   997 }
  1024 }
   998 
  1025 
   999 void checkFilterNodes2() {
  1026 void checkFilterNodes2() {
  1000   // Check concepts
  1027   // Check concepts
  1090   checkGraphArcMap(adaptor);
  1117   checkGraphArcMap(adaptor);
  1091   checkGraphEdgeMap(adaptor);
  1118   checkGraphEdgeMap(adaptor);
  1092 
  1119 
  1093   // Check the conversion of nodes and edges
  1120   // Check the conversion of nodes and edges
  1094   Graph::Node ng = n3;
  1121   Graph::Node ng = n3;
       
  1122   ::lemon::ignore_unused_variable_warning(ng);
  1095   ng = n4;
  1123   ng = n4;
  1096   Adaptor::Node na = n1;
  1124   Adaptor::Node na = n1;
       
  1125   ::lemon::ignore_unused_variable_warning(na);
  1097   na = n2;
  1126   na = n2;
  1098   Graph::Edge eg = e3;
  1127   Graph::Edge eg = e3;
       
  1128   ::lemon::ignore_unused_variable_warning(eg);
  1099   eg = e4;
  1129   eg = e4;
  1100   Adaptor::Edge ea = e1;
  1130   Adaptor::Edge ea = e1;
       
  1131   ::lemon::ignore_unused_variable_warning(ea);
  1101   ea = e2;
  1132   ea = e2;
  1102 }
  1133 }
  1103 
  1134 
  1104 void checkFilterEdges() {
  1135 void checkFilterEdges() {
  1105   // Check concepts
  1136   // Check concepts
  1196   checkGraphArcMap(adaptor);
  1227   checkGraphArcMap(adaptor);
  1197   checkGraphEdgeMap(adaptor);
  1228   checkGraphEdgeMap(adaptor);
  1198 
  1229 
  1199   // Check the conversion of nodes and edges
  1230   // Check the conversion of nodes and edges
  1200   Graph::Node ng = n3;
  1231   Graph::Node ng = n3;
       
  1232   ::lemon::ignore_unused_variable_warning(ng);
  1201   ng = n4;
  1233   ng = n4;
  1202   Adaptor::Node na = n1;
  1234   Adaptor::Node na = n1;
       
  1235   ::lemon::ignore_unused_variable_warning(na);
  1203   na = n2;
  1236   na = n2;
  1204   Graph::Edge eg = e3;
  1237   Graph::Edge eg = e3;
       
  1238   ::lemon::ignore_unused_variable_warning(eg);
  1205   eg = e4;
  1239   eg = e4;
  1206   Adaptor::Edge ea = e1;
  1240   Adaptor::Edge ea = e1;
       
  1241   ::lemon::ignore_unused_variable_warning(ea);
  1207   ea = e2;
  1242   ea = e2;
  1208 }
  1243 }
  1209 
  1244 
  1210 void checkOrienter() {
  1245 void checkOrienter() {
  1211   // Check concepts
  1246   // Check concepts
  1354   checkGraphInArcList(adaptor, n2, 2);
  1389   checkGraphInArcList(adaptor, n2, 2);
  1355   checkGraphInArcList(adaptor, n3, 0);
  1390   checkGraphInArcList(adaptor, n3, 0);
  1356 
  1391 
  1357   // Check the conversion of nodes and arcs/edges
  1392   // Check the conversion of nodes and arcs/edges
  1358   Graph::Node ng = n3;
  1393   Graph::Node ng = n3;
       
  1394   ::lemon::ignore_unused_variable_warning(ng);
  1359   ng = n3;
  1395   ng = n3;
  1360   Adaptor::Node na = n1;
  1396   Adaptor::Node na = n1;
       
  1397   ::lemon::ignore_unused_variable_warning(na);
  1361   na = n2;
  1398   na = n2;
  1362   Graph::Edge eg = e3;
  1399   Graph::Edge eg = e3;
       
  1400   ::lemon::ignore_unused_variable_warning(eg);
  1363   eg = e3;
  1401   eg = e3;
  1364   Adaptor::Arc aa = e1;
  1402   Adaptor::Arc aa = e1;
       
  1403   ::lemon::ignore_unused_variable_warning(aa);
  1365   aa = e2;
  1404   aa = e2;
  1366 }
  1405 }
  1367 
  1406 
  1368 void checkCombiningAdaptors() {
  1407 void checkCombiningAdaptors() {
  1369   // Create a grid graph
  1408   // Create a grid graph