1.1 --- a/lemon/graph_utils.h Mon Sep 12 05:35:36 2005 +0000
1.2 +++ b/lemon/graph_utils.h Mon Sep 12 09:15:59 2005 +0000
1.3 @@ -159,6 +159,15 @@
1.4 return countNodeDegree<Graph, typename Graph::InEdgeIt>(_g, _n);
1.5 }
1.6
1.7 + /// \brief Function to count the number of the in-edges to node \c n.
1.8 + ///
1.9 + /// This function counts the number of the in-edges to node \c n
1.10 + /// in the graph.
1.11 + template <typename Graph>
1.12 + inline int countIncEdges(const Graph& _g, const typename Graph::Node& _n) {
1.13 + return countNodeDegree<Graph, typename Graph::IncEdgeIt>(_g, _n);
1.14 + }
1.15 +
1.16
1.17 template <typename Graph>
1.18 inline
1.19 @@ -912,7 +921,7 @@
1.20 /// The subscript operator.
1.21 /// \param edge The edge
1.22 /// \return The source of the edge
1.23 - Value operator[](const Key& edge) {
1.24 + Value operator[](const Key& edge) const {
1.25 return graph.source(edge);
1.26 }
1.27
1.28 @@ -953,7 +962,7 @@
1.29 /// The subscript operator.
1.30 /// \param e The edge
1.31 /// \return The target of the edge
1.32 - Value operator[](const Key& e) {
1.33 + Value operator[](const Key& e) const {
1.34 return graph.target(e);
1.35 }
1.36