test/maps_test.cc
changeset 1079 5958cc5c0a98
parent 998 7fdaa05a69a1
child 1086 97f1760dcd13
equal deleted inserted replaced
26:5e06aef3fe7a 27:5331caee1857
   533           sourceMap(orienter(gr, constMap<Edge, bool>(true))),
   533           sourceMap(orienter(gr, constMap<Edge, bool>(true))),
   534           targetMap(orienter(gr, constMap<Edge, bool>(false)))),
   534           targetMap(orienter(gr, constMap<Edge, bool>(false)))),
   535           "Wrong SourceMap or TargetMap");
   535           "Wrong SourceMap or TargetMap");
   536 
   536 
   537     typedef Orienter<Graph, const ConstMap<Edge, bool> > Digraph;
   537     typedef Orienter<Graph, const ConstMap<Edge, bool> > Digraph;
   538     Digraph dgr(gr, constMap<Edge, bool>(true));
   538     ConstMap<Edge, bool> true_edge_map(true);
       
   539     Digraph dgr(gr, true_edge_map);
   539     OutDegMap<Digraph> odm(dgr);
   540     OutDegMap<Digraph> odm(dgr);
   540     InDegMap<Digraph> idm(dgr);
   541     InDegMap<Digraph> idm(dgr);
   541 
   542 
   542     check(odm[n0] == 3 && odm[n1] == 2 && odm[n2] == 1, "Wrong OutDegMap");
   543     check(odm[n0] == 3 && odm[n1] == 2 && odm[n2] == 1, "Wrong OutDegMap");
   543     check(idm[n0] == 0 && idm[n1] == 3 && idm[n2] == 3, "Wrong InDegMap");
   544     check(idm[n0] == 0 && idm[n1] == 3 && idm[n2] == 3, "Wrong InDegMap");