Class

CGAL::Arr_vertex_index_map<Arrangement>

Definition

Arr_vertex_index_map<Arrangement> maintains a mapping of vertex handles of an attached arrangement object to indices (of type unsigned int). This class template is a model of the Boost concept ReadablePropertyMap. A mapping between vertex handles and indices enables convenient usage of property-map classes supplied by Boost. For example, the property-map class templates boost::vector_property_map, which is based on std::vector, and boost::iterator_property_map, which can be used to implement a property map based on a native C++ array, require the user to supply a mapping such as Arr_vertex_index_map<Arrangement>.

As new vertices might be inserted into the attached arrangement, and existing vertices might be removed, the notification mechanism is used to dynamically maintain the mapping of vertex handles to indices.

Refines

DefaultConstructible, CopyConstructible, Assignable

Is Model for the Concepts

boost::ReadablePropertyMap

Inherits From

Arr_observer<Arrangement>

#include <CGAL/Arr_vertex_index_map.h>

Types

Arr_vertex_index_map<Arrangement>::Arrangement_2
the type of the attached arrangement.


Arr_vertex_index_map<Arrangement>::category
boost::readable_property_map_tag

Arr_vertex_index_map<Arrangement>::value_type
unsigned int

Arr_vertex_index_map<Arrangement>::reference
unsigned int

Arr_vertex_index_map<Arrangement>::key_type
Vertex_handle

typedef typename Arrangement_2::Vertex_handle
Vertex_handle; The vertex handle type.

typedef Unique_hash_map<Vertex_handle, value_type>
Index_map; The type of mapping of vertices to indices.

Creation

Arr_vertex_index_map<Arrangement> vertex_index_map;
constructs a map that is unattached to any arrangement instance.


Arr_vertex_index_map<Arrangement> vertex_index_map ( Arrangement_2& arr);
constructs a map and attaches it to the given arrangement arr.

See Also

Arr_observer<Arrangement>
Arr_face_index_map<Arrangement>