test/graph_test.h
changeset 1194 699c7eac2c6d
parent 1193 c8fa41fcc4a7
child 1195 8b2b9e61d8ce
     1.1 --- a/test/graph_test.h	Thu Dec 01 09:05:47 2011 +0100
     1.2 +++ b/test/graph_test.h	Wed Jan 11 22:21:07 2012 +0100
     1.3 @@ -43,7 +43,7 @@
     1.4    template<class Graph>
     1.5    void checkGraphRedNodeList(const Graph &G, int cnt)
     1.6    {
     1.7 -    typename Graph::RedIt n(G);
     1.8 +    typename Graph::RedNodeIt n(G);
     1.9      for(int i=0;i<cnt;i++) {
    1.10        check(n!=INVALID,"Wrong red Node list linking.");
    1.11        check(G.red(n),"Wrong node set check.");
    1.12 @@ -65,7 +65,7 @@
    1.13    template<class Graph>
    1.14    void checkGraphBlueNodeList(const Graph &G, int cnt)
    1.15    {
    1.16 -    typename Graph::BlueIt n(G);
    1.17 +    typename Graph::BlueNodeIt n(G);
    1.18      for(int i=0;i<cnt;i++) {
    1.19        check(n!=INVALID,"Wrong blue Node list linking.");
    1.20        check(G.blue(n),"Wrong node set check.");
    1.21 @@ -225,7 +225,7 @@
    1.22    void checkRedNodeIds(const Graph& G) {
    1.23      typedef typename Graph::RedNode RedNode;
    1.24      std::set<int> values;
    1.25 -    for (typename Graph::RedIt n(G); n != INVALID; ++n) {
    1.26 +    for (typename Graph::RedNodeIt n(G); n != INVALID; ++n) {
    1.27        check(G.red(n), "Wrong partition");
    1.28        check(values.find(G.id(n)) == values.end(), "Wrong id");
    1.29        check(G.id(n) <= G.maxRedId(), "Wrong maximum id");
    1.30 @@ -238,7 +238,7 @@
    1.31    void checkBlueNodeIds(const Graph& G) {
    1.32      typedef typename Graph::BlueNode BlueNode;
    1.33      std::set<int> values;
    1.34 -    for (typename Graph::BlueIt n(G); n != INVALID; ++n) {
    1.35 +    for (typename Graph::BlueNodeIt n(G); n != INVALID; ++n) {
    1.36        check(G.blue(n), "Wrong partition");
    1.37        check(values.find(G.id(n)) == values.end(), "Wrong id");
    1.38        check(G.id(n) <= G.maxBlueId(), "Wrong maximum id");
    1.39 @@ -304,17 +304,17 @@
    1.40    }
    1.41  
    1.42    template <typename Graph>
    1.43 -  void checkGraphRedMap(const Graph& G) {
    1.44 +  void checkGraphRedNodeMap(const Graph& G) {
    1.45      typedef typename Graph::Node Node;
    1.46 -    typedef typename Graph::RedIt RedIt;
    1.47 +    typedef typename Graph::RedNodeIt RedNodeIt;
    1.48  
    1.49 -    typedef typename Graph::template RedMap<int> IntRedMap;
    1.50 -    IntRedMap map(G, 42);
    1.51 -    for (RedIt it(G); it != INVALID; ++it) {
    1.52 +    typedef typename Graph::template RedNodeMap<int> IntRedNodeMap;
    1.53 +    IntRedNodeMap map(G, 42);
    1.54 +    for (RedNodeIt it(G); it != INVALID; ++it) {
    1.55        check(map[it] == 42, "Wrong map constructor.");
    1.56      }
    1.57      int s = 0;
    1.58 -    for (RedIt it(G); it != INVALID; ++it) {
    1.59 +    for (RedNodeIt it(G); it != INVALID; ++it) {
    1.60        map[it] = 0;
    1.61        check(map[it] == 0, "Wrong operator[].");
    1.62        map.set(it, s);
    1.63 @@ -322,7 +322,7 @@
    1.64        ++s;
    1.65      }
    1.66      s = s * (s - 1) / 2;
    1.67 -    for (RedIt it(G); it != INVALID; ++it) {
    1.68 +    for (RedNodeIt it(G); it != INVALID; ++it) {
    1.69        s -= map[it];
    1.70      }
    1.71      check(s == 0, "Wrong sum.");
    1.72 @@ -334,17 +334,17 @@
    1.73    }
    1.74  
    1.75    template <typename Graph>
    1.76 -  void checkGraphBlueMap(const Graph& G) {
    1.77 +  void checkGraphBlueNodeMap(const Graph& G) {
    1.78      typedef typename Graph::Node Node;
    1.79 -    typedef typename Graph::BlueIt BlueIt;
    1.80 +    typedef typename Graph::BlueNodeIt BlueNodeIt;
    1.81  
    1.82 -    typedef typename Graph::template BlueMap<int> IntBlueMap;
    1.83 -    IntBlueMap map(G, 42);
    1.84 -    for (BlueIt it(G); it != INVALID; ++it) {
    1.85 +    typedef typename Graph::template BlueNodeMap<int> IntBlueNodeMap;
    1.86 +    IntBlueNodeMap map(G, 42);
    1.87 +    for (BlueNodeIt it(G); it != INVALID; ++it) {
    1.88        check(map[it] == 42, "Wrong map constructor.");
    1.89      }
    1.90      int s = 0;
    1.91 -    for (BlueIt it(G); it != INVALID; ++it) {
    1.92 +    for (BlueNodeIt it(G); it != INVALID; ++it) {
    1.93        map[it] = 0;
    1.94        check(map[it] == 0, "Wrong operator[].");
    1.95        map.set(it, s);
    1.96 @@ -352,7 +352,7 @@
    1.97        ++s;
    1.98      }
    1.99      s = s * (s - 1) / 2;
   1.100 -    for (BlueIt it(G); it != INVALID; ++it) {
   1.101 +    for (BlueNodeIt it(G); it != INVALID; ++it) {
   1.102        s -= map[it];
   1.103      }
   1.104      check(s == 0, "Wrong sum.");