From c19c648682d023d680cb7231528c65c6f5e6bc70 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 10 Oct 2024 19:35:39 +0100 Subject: [PATCH] Add index_pmap --- .../graph/graph_traits_geometrycentral.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/BGL/include/CGAL/boost/graph/graph_traits_geometrycentral.h b/BGL/include/CGAL/boost/graph/graph_traits_geometrycentral.h index d30982c7c6aa..8ed7d7c87993 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_geometrycentral.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_geometrycentral.h @@ -738,6 +738,25 @@ class GC_point_pmap const VertexPositionGeometry* vpg_; }; +template +class GC_index_pmap +{ +public: + typedef boost::readable_property_map_tag category; + typedef std::size_t value_type; + typedef std::size_t reference; + typedef VEF key_type; + + GC_index_pmap() + {} + + value_type operator[](const key_type& vd) const + { + return vd.getIndex(); + } + + friend inline value_type get(const GC_index_pmap& m, const key_type& k) { return m[k]; } +}; } // namespace surface } // namespace geometrycentral