Changeset 1053:90f8696360b2 in lemon0.x for src/lemon/graph_utils.h
 Timestamp:
 01/05/05 15:34:00 (20 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@1447
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

src/lemon/graph_utils.h
r986 r1053 104 104 } 105 105 106 /// \brief Function to count the symmetric edges in the graph. 107 /// 108 /// This function counts the symmetric edges in the graph. 106 // Undirected edge counting: 107 108 template <typename Graph> 109 inline 110 typename enable_if<typename Graph::EdgeNumTag, int>::type 111 _countUndirEdges(const Graph &g) { 112 return g.undirEdgeNum(); 113 } 114 115 template <typename Graph> 116 inline int _countUndirEdges(Wrap<Graph> w) { 117 return countItems<Graph, typename Graph::UndirEdgeIt>(w.value); 118 } 119 120 /// \brief Function to count the edges in the graph. 121 /// 122 /// This function counts the edges in the graph. 109 123 /// The complexity of the function is O(e) but for some 110 124 /// graph structure it is specialized to run in O(1). 111 template <typename Graph> 112 inline int countSymEdges(const Graph& _g) { 113 return countItems<Graph, typename Graph::SymEdgeIt>(_g); 114 } 125 126 template <typename Graph> 127 inline int countUndirEdges(const Graph& g) { 128 return _countUndirEdges<Graph>(g); 129 } 130 115 131 116 132
Note: See TracChangeset
for help on using the changeset viewer.