diff -r b7b7125a5fe8 -r e825655c24a4 lemon/graph_utils.h --- a/lemon/graph_utils.h Mon Sep 12 05:35:36 2005 +0000 +++ b/lemon/graph_utils.h Mon Sep 12 09:15:59 2005 +0000 @@ -159,6 +159,15 @@ return countNodeDegree(_g, _n); } + /// \brief Function to count the number of the in-edges to node \c n. + /// + /// This function counts the number of the in-edges to node \c n + /// in the graph. + template + inline int countIncEdges(const Graph& _g, const typename Graph::Node& _n) { + return countNodeDegree(_g, _n); + } + template inline @@ -912,7 +921,7 @@ /// The subscript operator. /// \param edge The edge /// \return The source of the edge - Value operator[](const Key& edge) { + Value operator[](const Key& edge) const { return graph.source(edge); } @@ -953,7 +962,7 @@ /// The subscript operator. /// \param e The edge /// \return The target of the edge - Value operator[](const Key& e) { + Value operator[](const Key& e) const { return graph.target(e); }