equal
deleted
inserted
replaced
157 template <typename Graph> |
157 template <typename Graph> |
158 inline int countInEdges(const Graph& _g, const typename Graph::Node& _n) { |
158 inline int countInEdges(const Graph& _g, const typename Graph::Node& _n) { |
159 return countNodeDegree<Graph, typename Graph::InEdgeIt>(_g, _n); |
159 return countNodeDegree<Graph, typename Graph::InEdgeIt>(_g, _n); |
160 } |
160 } |
161 |
161 |
|
162 /// \brief Function to count the number of the in-edges to node \c n. |
|
163 /// |
|
164 /// This function counts the number of the in-edges to node \c n |
|
165 /// in the graph. |
|
166 template <typename Graph> |
|
167 inline int countIncEdges(const Graph& _g, const typename Graph::Node& _n) { |
|
168 return countNodeDegree<Graph, typename Graph::IncEdgeIt>(_g, _n); |
|
169 } |
|
170 |
162 |
171 |
163 template <typename Graph> |
172 template <typename Graph> |
164 inline |
173 inline |
165 typename enable_if<typename Graph::FindEdgeTag, typename Graph::Edge>::type |
174 typename enable_if<typename Graph::FindEdgeTag, typename Graph::Edge>::type |
166 _findEdge(const Graph &g, |
175 _findEdge(const Graph &g, |
910 /// \brief The subscript operator. |
919 /// \brief The subscript operator. |
911 /// |
920 /// |
912 /// The subscript operator. |
921 /// The subscript operator. |
913 /// \param edge The edge |
922 /// \param edge The edge |
914 /// \return The source of the edge |
923 /// \return The source of the edge |
915 Value operator[](const Key& edge) { |
924 Value operator[](const Key& edge) const { |
916 return graph.source(edge); |
925 return graph.source(edge); |
917 } |
926 } |
918 |
927 |
919 private: |
928 private: |
920 const Graph& graph; |
929 const Graph& graph; |
951 /// \brief The subscript operator. |
960 /// \brief The subscript operator. |
952 /// |
961 /// |
953 /// The subscript operator. |
962 /// The subscript operator. |
954 /// \param e The edge |
963 /// \param e The edge |
955 /// \return The target of the edge |
964 /// \return The target of the edge |
956 Value operator[](const Key& e) { |
965 Value operator[](const Key& e) const { |
957 return graph.target(e); |
966 return graph.target(e); |
958 } |
967 } |
959 |
968 |
960 private: |
969 private: |
961 const Graph& graph; |
970 const Graph& graph; |