Skip to content

Commit

Permalink
Add index_pmap
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Oct 10, 2024
1 parent 795e141 commit c19c648
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions BGL/include/CGAL/boost/graph/graph_traits_geometrycentral.h
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,25 @@ class GC_point_pmap
const VertexPositionGeometry* vpg_;
};

template <typename K, typename VEF>
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
Expand Down

0 comments on commit c19c648

Please sign in to comment.