Add missing tags and indicators
authorPeter Kovacs <kpeter@inf.elte.hu>
Tue, 04 Nov 2008 21:36:46 +0100
changeset 36075cf49ce5390
parent 357 3fb8ed1322de
child 361 f58410582b9b
Add missing tags and indicators
lemon/bits/traits.h
lemon/full_graph.h
lemon/grid_graph.h
lemon/smart_graph.h
     1.1 --- a/lemon/bits/traits.h	Tue Nov 04 10:25:47 2008 +0000
     1.2 +++ b/lemon/bits/traits.h	Tue Nov 04 21:36:46 2008 +0100
     1.3 @@ -218,6 +218,19 @@
     1.4    };
     1.5  
     1.6    template <typename Graph, typename Enable = void>
     1.7 +  struct ArcNumTagIndicator {
     1.8 +    static const bool value = false;
     1.9 +  };
    1.10 +
    1.11 +  template <typename Graph>
    1.12 +  struct ArcNumTagIndicator<
    1.13 +    Graph,
    1.14 +    typename enable_if<typename Graph::ArcNumTag, void>::type
    1.15 +  > {
    1.16 +    static const bool value = true;
    1.17 +  };
    1.18 +
    1.19 +  template <typename Graph, typename Enable = void>
    1.20    struct EdgeNumTagIndicator {
    1.21      static const bool value = false;
    1.22    };
    1.23 @@ -231,6 +244,19 @@
    1.24    };
    1.25  
    1.26    template <typename Graph, typename Enable = void>
    1.27 +  struct FindArcTagIndicator {
    1.28 +    static const bool value = false;
    1.29 +  };
    1.30 +
    1.31 +  template <typename Graph>
    1.32 +  struct FindArcTagIndicator<
    1.33 +    Graph,
    1.34 +    typename enable_if<typename Graph::FindArcTag, void>::type
    1.35 +  > {
    1.36 +    static const bool value = true;
    1.37 +  };
    1.38 +
    1.39 +  template <typename Graph, typename Enable = void>
    1.40    struct FindEdgeTagIndicator {
    1.41      static const bool value = false;
    1.42    };
     2.1 --- a/lemon/full_graph.h	Tue Nov 04 10:25:47 2008 +0000
     2.2 +++ b/lemon/full_graph.h	Tue Nov 04 21:36:46 2008 +0100
     2.3 @@ -306,6 +306,7 @@
     2.4      }
     2.5  
     2.6      typedef True NodeNumTag;
     2.7 +    typedef True ArcNumTag;
     2.8      typedef True EdgeNumTag;
     2.9  
    2.10      int nodeNum() const { return _node_num; }
    2.11 @@ -343,6 +344,7 @@
    2.12      }
    2.13  
    2.14      typedef True FindEdgeTag;
    2.15 +    typedef True FindArcTag;
    2.16  
    2.17      Edge findEdge(Node u, Node v, Edge prev = INVALID) const {
    2.18        return prev != INVALID ? INVALID : edge(u, v);
     3.1 --- a/lemon/grid_graph.h	Tue Nov 04 10:25:47 2008 +0000
     3.2 +++ b/lemon/grid_graph.h	Tue Nov 04 21:36:46 2008 +0100
     3.3 @@ -82,6 +82,7 @@
     3.4      }
     3.5  
     3.6      typedef True NodeNumTag;
     3.7 +    typedef True EdgeNumTag;
     3.8      typedef True ArcNumTag;
     3.9  
    3.10      int nodeNum() const { return _node_num; }
    3.11 @@ -127,6 +128,7 @@
    3.12      static Arc arcFromId(int id) { return Arc(id);}
    3.13  
    3.14      typedef True FindEdgeTag;
    3.15 +    typedef True FindArcTag;
    3.16  
    3.17      Edge findEdge(Node u, Node v, Edge prev = INVALID) const {
    3.18        if (prev != INVALID) return INVALID;
     4.1 --- a/lemon/smart_graph.h	Tue Nov 04 10:25:47 2008 +0000
     4.2 +++ b/lemon/smart_graph.h	Tue Nov 04 21:36:46 2008 +0100
     4.3 @@ -67,7 +67,7 @@
     4.4        : nodes(_g.nodes), arcs(_g.arcs) { }
     4.5  
     4.6      typedef True NodeNumTag;
     4.7 -    typedef True EdgeNumTag;
     4.8 +    typedef True ArcNumTag;
     4.9  
    4.10      int nodeNum() const { return nodes.size(); }
    4.11      int arcNum() const { return arcs.size(); }