diff --git a/lemon/bits/traits.h b/lemon/bits/traits.h --- a/lemon/bits/traits.h +++ b/lemon/bits/traits.h @@ -218,6 +218,19 @@ }; template + struct ArcNumTagIndicator { + static const bool value = false; + }; + + template + struct ArcNumTagIndicator< + Graph, + typename enable_if::type + > { + static const bool value = true; + }; + + template struct EdgeNumTagIndicator { static const bool value = false; }; @@ -231,6 +244,19 @@ }; template + struct FindArcTagIndicator { + static const bool value = false; + }; + + template + struct FindArcTagIndicator< + Graph, + typename enable_if::type + > { + static const bool value = true; + }; + + template struct FindEdgeTagIndicator { static const bool value = false; }; diff --git a/lemon/full_graph.h b/lemon/full_graph.h --- a/lemon/full_graph.h +++ b/lemon/full_graph.h @@ -306,6 +306,7 @@ } typedef True NodeNumTag; + typedef True ArcNumTag; typedef True EdgeNumTag; int nodeNum() const { return _node_num; } @@ -343,6 +344,7 @@ } typedef True FindEdgeTag; + typedef True FindArcTag; Edge findEdge(Node u, Node v, Edge prev = INVALID) const { return prev != INVALID ? INVALID : edge(u, v); diff --git a/lemon/grid_graph.h b/lemon/grid_graph.h --- a/lemon/grid_graph.h +++ b/lemon/grid_graph.h @@ -82,6 +82,7 @@ } typedef True NodeNumTag; + typedef True EdgeNumTag; typedef True ArcNumTag; int nodeNum() const { return _node_num; } @@ -127,6 +128,7 @@ static Arc arcFromId(int id) { return Arc(id);} typedef True FindEdgeTag; + typedef True FindArcTag; Edge findEdge(Node u, Node v, Edge prev = INVALID) const { if (prev != INVALID) return INVALID; diff --git a/lemon/smart_graph.h b/lemon/smart_graph.h --- a/lemon/smart_graph.h +++ b/lemon/smart_graph.h @@ -67,7 +67,7 @@ : nodes(_g.nodes), arcs(_g.arcs) { } typedef True NodeNumTag; - typedef True EdgeNumTag; + typedef True ArcNumTag; int nodeNum() const { return nodes.size(); } int arcNum() const { return arcs.size(); }