test/adaptors_test.cc
branch1.2
changeset 1154 2da3de1c0ebe
parent 550 c35afa9e89e7
child 1159 7fdaa05a69a1
equal deleted inserted replaced
1:88db9153443c 2:897ce0d561b7
  1375   dir_map[graph.up(n1)] = graph.u(graph.up(n1)) == n1;
  1375   dir_map[graph.up(n1)] = graph.u(graph.up(n1)) == n1;
  1376   dir_map[graph.left(n4)] = graph.u(graph.left(n4)) == n4;
  1376   dir_map[graph.left(n4)] = graph.u(graph.left(n4)) == n4;
  1377   dir_map[graph.down(n4)] = graph.u(graph.down(n4)) == n4;
  1377   dir_map[graph.down(n4)] = graph.u(graph.down(n4)) == n4;
  1378 
  1378 
  1379   // Apply several adaptors on the grid graph
  1379   // Apply several adaptors on the grid graph
  1380   typedef SplitNodes<Orienter< const GridGraph, GridGraph::EdgeMap<bool> > >
  1380   typedef Orienter< const GridGraph, GridGraph::EdgeMap<bool> >
  1381     SplitGridGraph;
  1381     OrientedGridGraph;
       
  1382   typedef SplitNodes<OrientedGridGraph> SplitGridGraph;
  1382   typedef Undirector<const SplitGridGraph> USplitGridGraph;
  1383   typedef Undirector<const SplitGridGraph> USplitGridGraph;
  1383   checkConcept<concepts::Digraph, SplitGridGraph>();
  1384   checkConcept<concepts::Digraph, SplitGridGraph>();
  1384   checkConcept<concepts::Graph, USplitGridGraph>();
  1385   checkConcept<concepts::Graph, USplitGridGraph>();
  1385 
  1386 
  1386   SplitGridGraph adaptor = splitNodes(orienter(graph, dir_map));
  1387   OrientedGridGraph oadaptor = orienter(graph, dir_map);
       
  1388   SplitGridGraph adaptor = splitNodes(oadaptor);
  1387   USplitGridGraph uadaptor = undirector(adaptor);
  1389   USplitGridGraph uadaptor = undirector(adaptor);
  1388 
  1390 
  1389   // Check adaptor
  1391   // Check adaptor
  1390   checkGraphNodeList(adaptor, 8);
  1392   checkGraphNodeList(adaptor, 8);
  1391   checkGraphArcList(adaptor, 8);
  1393   checkGraphArcList(adaptor, 8);