Changeset 1053:90f8696360b2 in lemon-0.x for src/lemon
- Timestamp:
- 01/05/05 15:34:00 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1447
- Location:
- src/lemon
- Files:
-
- 2 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 -
src/lemon/undir_graph_extender.h
r1030 r1053 49 49 UndirEdge(ue), forward(_forward) {} 50 50 /// Invalid edge constructor 51 Edge(Invalid i) : UndirEdge(i), forward( false) {}51 Edge(Invalid i) : UndirEdge(i), forward(true) {} 52 52 53 53 bool operator==(const Edge &that) const {
Note: See TracChangeset
for help on using the changeset viewer.