diff --git a/BGL/include/CGAL/boost/graph/iterator.h b/BGL/include/CGAL/boost/graph/iterator.h index 8b9fa6c1655..5b19c632898 100644 --- a/BGL/include/CGAL/boost/graph/iterator.h +++ b/BGL/include/CGAL/boost/graph/iterator.h @@ -502,6 +502,7 @@ class Halfedge_around_source_circulator #ifndef DOXYGEN_RUNNING typedef boost::transform_iterator, Halfedge_around_target_circulator > Base; typedef typename boost::graph_traits::halfedge_descriptor halfedge_descriptor; + typedef typename boost::graph_traits::vertex_descriptor vertex_descriptor; #endif public: @@ -518,6 +519,9 @@ public: : Base(Halfedge_around_target_circulator(hd,g), internal::Opposite(g)) {} + Halfedge_around_source_circulator(vertex_descriptor vd, const Graph& g) + : Base(Halfedge_around_target_circulator(halfedge(vd,g),g), internal::Opposite(g)) + {} }; @@ -606,6 +610,11 @@ public: Halfedge_around_target_circulator(halfedge_descriptor pos, const Graph& g) : pos(pos), g(&g) {} + + Halfedge_around_target_circulator(vertex_descriptor vd, const Graph& g) + : pos(halfedge(vd,g)), g(&g) + {} + #ifndef DOXYGEN_RUNNING reference operator * ( ) { return pos; } const value_type& operator * ( ) const { return pos; } @@ -779,6 +788,10 @@ halfedges_around_source(typename boost::graph_traits::halfedge_descriptor return std::make_pair(I(h,g), I(h,g,1)); } +/** + * \ingroup PkgBGLIterators + * returns an iterator range over all halfedges with vertex `v` as source. + */ template std::pair,Halfedge_around_source_iterator > halfedges_around_source(typename boost::graph_traits::vertex_descriptor v, Graph& g) @@ -798,6 +811,10 @@ halfedges_around_target(typename boost::graph_traits::halfedge_descriptor return std::make_pair(I(h,g), I(h,g,1)); } +/** + * \ingroup PkgBGLIterators + * returns an iterator range over all halfedges with vertex `v` as target. + */ template std::pair,Halfedge_around_target_iterator > halfedges_around_target(typename boost::graph_traits::vertex_descriptor v, Graph& g)