\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.4 - 2D Arrangements
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Arr_vertex_index_map< Arrangement > Class Template Reference

#include <CGAL/Arr_vertex_index_map.h>

Inherits from

CGAL::Arr_observer< Arrangement >.

Definition

Arr_vertex_index_map 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 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.

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.

Is Model Of:

DefaultConstructible

CopyConstructible

Assignable

ReadablePropertyMap

See Also
Arr_observer<Arrangement>
Arr_face_index_map<Arrangement>
Examples:
Arrangement_on_surface_2/bgl_primal_adapter.cpp.

Types

typedef Arrangement Arrangement_2
 the type of the attached arrangement. More...
 
typedef
boost::readable_property_map_tag 
category
 
typedef unsigned int value_type
 
typedef unsigned int reference
 
typedef Vertex_handle key_type
 
typedef
Arrangement_2::Vertex_handle 
Vertex_handle
 The vertex handle type. More...
 
typedef Unique_hash_map
< Vertex_handle, value_type
Index_map
 The type of mapping of vertices to indices. More...
 

Creation

 Arr_vertex_index_map ()
 constructs a map that is unattached to any arrangement instance. More...
 
 Arr_vertex_index_map (Arrangement_2 &arr)
 constructs a map and attaches it to the given arrangement arr. More...
 

Member Typedef Documentation

template<typename Arrangement>
typedef Arrangement CGAL::Arr_vertex_index_map< Arrangement >::Arrangement_2

the type of the attached arrangement.

template<typename Arrangement>
typedef boost::readable_property_map_tag CGAL::Arr_vertex_index_map< Arrangement >::category
template<typename Arrangement>
typedef Unique_hash_map<Vertex_handle, value_type> CGAL::Arr_vertex_index_map< Arrangement >::Index_map

The type of mapping of vertices to indices.

template<typename Arrangement>
typedef Vertex_handle CGAL::Arr_vertex_index_map< Arrangement >::key_type
template<typename Arrangement>
typedef unsigned int CGAL::Arr_vertex_index_map< Arrangement >::reference
template<typename Arrangement>
typedef unsigned int CGAL::Arr_vertex_index_map< Arrangement >::value_type
template<typename Arrangement>
typedef Arrangement_2::Vertex_handle CGAL::Arr_vertex_index_map< Arrangement >::Vertex_handle

The vertex handle type.

Constructor & Destructor Documentation

template<typename Arrangement>
CGAL::Arr_vertex_index_map< Arrangement >::Arr_vertex_index_map ( )

constructs a map that is unattached to any arrangement instance.

template<typename Arrangement>
CGAL::Arr_vertex_index_map< Arrangement >::Arr_vertex_index_map ( Arrangement_2 arr)

constructs a map and attaches it to the given arrangement arr.