diff -r 172ce6c3ac6e -r 90f8696360b2 src/lemon/graph_utils.h --- a/src/lemon/graph_utils.h Wed Jan 05 12:26:59 2005 +0000 +++ b/src/lemon/graph_utils.h Wed Jan 05 14:34:00 2005 +0000 @@ -103,17 +103,33 @@ return _countEdges(g); } - /// \brief Function to count the symmetric edges in the graph. + // Undirected edge counting: + + template + inline + typename enable_if::type + _countUndirEdges(const Graph &g) { + return g.undirEdgeNum(); + } + + template + inline int _countUndirEdges(Wrap w) { + return countItems(w.value); + } + + /// \brief Function to count the edges in the graph. /// - /// This function counts the symmetric edges in the graph. + /// This function counts the edges in the graph. /// The complexity of the function is O(e) but for some /// graph structure it is specialized to run in O(1). + template - inline int countSymEdges(const Graph& _g) { - return countItems(_g); + inline int countUndirEdges(const Graph& g) { + return _countUndirEdges(g); } + template inline int countNodeDegree(const Graph& _g, const typename Graph::Node& _n) { int num = 0;