\( \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.8.2 - Combinatorial Maps
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

High-level operations.

#include <CGAL/Combinatorial_map_operations.h>

Functions

template<class CMap >
CMap::Dart_handle CGAL::insert_cell_0_in_cell_1 (CMap &cm, typename CMap::Dart_handle dh)
 Inserts a 0-cell in the 1-cell containing dh. More...
 
template<class CMap >
CMap::Dart_handle CGAL::insert_cell_0_in_cell_2 (CMap &cm, typename CMap::Dart_handle dh)
 Inserts a 0-cell in the 2-cell containing dh. More...
 
template<class CMap >
CMap::Dart_handle CGAL::insert_cell_1_in_cell_2 (CMap &cm, typename CMap::Dart_handle dh1, typename CMap::Dart_handle dh2)
 Inserts a 1-cell in the 2-cell containing dh1 and dh2. More...
 
template<class CMap , class InputIterator >
CMap::Dart_handle CGAL::insert_cell_2_in_cell_3 (CMap &cm, InputIterator afirst, InputIterator alast)
 Inserts a 2-cell along the path of 1-cells containing darts given by the range [afirst,alast). More...
 
template<class CMap >
CMap::Dart_handle CGAL::insert_dangling_cell_1_in_cell_2 (CMap &cm, typename CMap::Dart_handle dh)
 Inserts a 1-cell in a the 2-cell containing dh, the 1-cell being attached only by one of its extremity to the 0-cell containing dh. More...
 
template<class CMap >
bool CGAL::is_insertable_cell_1_in_cell_2 (const CMap &cm, typename CMap::Dart_const_handle dh1, typename CMap::Dart_const_handle dh2)
 Returns true iff it is possible to insert a 1-cell in cm between dh1 and dh2. More...
 
template<class CMap , class InputIterator >
bool CGAL::is_insertable_cell_2_in_cell_3 (const CMap &cm, InputIterator afirst, InputIterator alast)
 Returns true iff it is possible to insert a 2-cell in cm along the path of darts given by the range [afirst,alast). More...
 
template<class CMap , unsigned int i>
bool CGAL::is_removable (const CMap &cm, typename CMap::Dart_const_handle dh)
 Returns true iff the i-cell containing dh can be removed. More...
 
template<class CMap , unsigned int i>
CMap::size_type CGAL::remove_cell (CMap &cm, typename CMap::Dart_handle dh)
 Removes the i-cell containing dh. More...
 

Function Documentation

template<class CMap >
CMap::Dart_handle CGAL::insert_cell_0_in_cell_1 ( CMap &  cm,
typename CMap::Dart_handle  dh 
)

Inserts a 0-cell in the 1-cell containing dh.

Returns a handle on one dart belonging to the new 0-cell.

Precondition
CMap::dimension \( \geq\) 1 and *dh \( \in\)cm.darts().

See example in Figure 27.11.

If are_attributes_automatically_managed()==true, if 1-attributes are non void, Attribute_type<1>::type::On_split(a,a') is called, with a the original 1-attribute associated with dh and a' the new 1-attribute created during the operation. If set, the dynamic onsplit function of 1-attributes is also called on a and a'.

Advanced

If are_attributes_automatically_managed()==false, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.

See Also
CGAL::insert_cell_0_in_cell_2<CMap>
CGAL::insert_cell_1_in_cell_2<CMap>
CGAL::insert_dangling_cell_1_in_cell_2<CMap>
CGAL::insert_cell_2_in_cell_3<CMap,InputIterator>
CGAL::remove_cell<CMap,i>

#include <CGAL/Combinatorial_map_operations.h>

template<class CMap >
CMap::Dart_handle CGAL::insert_cell_0_in_cell_2 ( CMap &  cm,
typename CMap::Dart_handle  dh 
)

Inserts a 0-cell in the 2-cell containing dh.

The 2-cell is split in triangles, one for each initial edge of the facet. Returns a handle on one dart belonging to the new 0-cell.

Precondition
CMap::dimension \( \geq\) 2 and *dh \( \in\)cm.darts().

See example in Figure 27.12.

If are_attributes_automatically_managed()==true, if 2-attributes are non void, Attribute_type<2>::type::On_split(a,a') is called, with a the original 2-attribute associated with dh and a' each new 2-attribute created during the operation. If set, the dynamic onsplit function of 2-attributes is also called on a and a'.

Advanced

If are_attributes_automatically_managed()==false, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.

See Also
CGAL::insert_cell_0_in_cell_2<CMap>
CGAL::insert_cell_1_in_cell_2<CMap>
CGAL::insert_dangling_cell_1_in_cell_2<CMap>
CGAL::insert_cell_2_in_cell_3<CMap,InputIterator>
CGAL::remove_cell<CMap,i>

#include <CGAL/Combinatorial_map_operations.h>

Examples:
Combinatorial_map/map_3_dynamic_onmerge.cpp, and Combinatorial_map/map_3_with_colored_facets.cpp.
template<class CMap >
CMap::Dart_handle CGAL::insert_cell_1_in_cell_2 ( CMap &  cm,
typename CMap::Dart_handle  dh1,
typename CMap::Dart_handle  dh2 
)

Inserts a 1-cell in the 2-cell containing dh1 and dh2.

Returns \( \beta_0\)(dh1), a handle on one dart belonging to the new 1-cell.

Precondition
is_insertable_cell_1_in_cell_2<Map>(cm,dh1,dh2).

See example in Figure 27.13.

If are_attributes_automatically_managed()==true, if 2-attributes are non void, Attribute_type<2>::type::On_split(a,a') is called, with a the original 2-attribute associated with dh and a' the new 2-attribute created during the operation. If set, the dynamic onsplit function of 2-attributes is also called on a and a'.

Advanced

If are_attributes_automatically_managed()==false, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.

See Also
CGAL::is_insertable_cell_1_in_cell_2<CMap>
CGAL::insert_cell_0_in_cell_1<CMap>
CGAL::insert_cell_0_in_cell_2<CMap>
CGAL::insert_dangling_cell_1_in_cell_2<CMap>
CGAL::insert_cell_2_in_cell_3<CMap,InputIterator>
CGAL::remove_cell<CMap,i>

#include <CGAL/Combinatorial_map_operations.h>

Examples:
Combinatorial_map/map_3_operations.cpp.
template<class CMap , class InputIterator >
CMap::Dart_handle CGAL::insert_cell_2_in_cell_3 ( CMap &  cm,
InputIterator  afirst,
InputIterator  alast 
)

Inserts a 2-cell along the path of 1-cells containing darts given by the range [afirst,alast).

Returns a handle on one dart belonging to the new 2-cell.

Precondition
is_insertable_cell_2_in_cell_3<Map>(cm,afirst,alast).

See example in Figure 27.14.

If are_attributes_automatically_managed()==true, if 3-attributes are non void, Attribute_type<3>::type::On_split(a,a') is called, with a the original 3-attribute associated with dh and a' the new 3-attribute created during the operation. If set, the dynamic onsplit function of 3-attributes is also called on a and a'.

Advanced

If are_attributes_automatically_managed()==false, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.

See Also
CGAL::is_insertable_cell_2_in_cell_3<CMap,InputIterator>
CGAL::insert_cell_0_in_cell_1<CMap>
CGAL::insert_cell_0_in_cell_2<CMap>
CGAL::insert_cell_1_in_cell_2<CMap>
CGAL::insert_dangling_cell_1_in_cell_2<CMap>
CGAL::remove_cell<CMap,i>

#include <CGAL/Combinatorial_map_operations.h>

Examples:
Combinatorial_map/map_3_operations.cpp.
template<class CMap >
CMap::Dart_handle CGAL::insert_dangling_cell_1_in_cell_2 ( CMap &  cm,
typename CMap::Dart_handle  dh 
)

Inserts a 1-cell in a the 2-cell containing dh, the 1-cell being attached only by one of its extremity to the 0-cell containing dh.

Returns a handle on the dart belonging to the new 1-cell and to the new 0-cell.

Precondition
CMap::dimension \( \geq\) 2 and *dh \( \in\)cm.darts().

See example in Figure 27.13.

Advanced

If are_attributes_automatically_managed()==false, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.

See Also
CGAL::insert_cell_0_in_cell_1<CMap>
CGAL::insert_cell_0_in_cell_2<CMap>
CGAL::insert_cell_1_in_cell_2<CMap>
CGAL::insert_cell_2_in_cell_3<CMap,InputIterator>
CGAL::remove_cell<CMap,i>

#include <CGAL/Combinatorial_map_operations.h>

template<class CMap >
bool CGAL::is_insertable_cell_1_in_cell_2 ( const CMap &  cm,
typename CMap::Dart_const_handle  dh1,
typename CMap::Dart_const_handle  dh2 
)

Returns true iff it is possible to insert a 1-cell in cm between dh1 and dh2.

This is possible if dh1 \( \neq\)dh2 and dh1 \( \in\) \( \langle{}\) \( \beta_1\) \( \rangle{}\)(dh2).

Precondition
CMap::dimension \( \geq\) 2, *dh1 \( \in\)cm.darts(), and *dh2 \( \in\)cm.darts().
See Also
CGAL::insert_cell_1_in_cell_2<CMap>
CGAL::is_insertable_cell_2_in_cell_3<CMap,InputIterator>

#include <CGAL/Combinatorial_map_operations.h>

Examples:
Combinatorial_map/map_3_operations.cpp.
template<class CMap , class InputIterator >
bool CGAL::is_insertable_cell_2_in_cell_3 ( const CMap &  cm,
InputIterator  afirst,
InputIterator  alast 
)

Returns true iff it is possible to insert a 2-cell in cm along the path of darts given by the range [afirst,alast).

The 2-cell can be inserted iff each couple of consecutive darts of the path a1 and a2 belong to the same vertex and the same volume, and if the path is closed.

Precondition
CMap::dimension \( \geq\) 3.
See Also
CGAL::insert_cell_2_in_cell_3<CMap,InputIterator>
CGAL::is_insertable_cell_1_in_cell_2<CMap>

#include <CGAL/Combinatorial_map_operations.h>

Examples:
Combinatorial_map/map_3_operations.cpp.
template<class CMap , unsigned int i>
bool CGAL::is_removable ( const CMap &  cm,
typename CMap::Dart_const_handle  dh 
)

Returns true iff the i-cell containing dh can be removed.

An i-cell can be removed if i==CMap::dimension or if i==CMap::dimension-1 or if i \( <\)CMap::dimension-1 and the i-cell containing dh is incident to at most two (i+1)-cells.

Precondition
0 \( \leq\)i \( \leq\)CMap::dimension and *dh \( \in\)cm.darts().
See Also
CGAL::remove_cell<CMap,i>

#include <CGAL/Combinatorial_map_operations.h>

template<class CMap , unsigned int i>
CMap::size_type CGAL::remove_cell ( CMap &  cm,
typename CMap::Dart_handle  dh 
)

Removes the i-cell containing dh.

Returns the number of darts removed from cm.

Precondition
is_removable<CMap,i>(cm,dh).

See examples in Figure 27.11, Figure 27.13 and Figure 27.14.

If are_attributes_automatically_managed()==true, if i \( <\)CMap::dimension, and i+1-attributes are non void, and if there are two distinct (i+1)-cells around dart dh, Attribute_type<i+1>::type::On_merge(a1,a2) is called, with a1 the (i+1)-attribute associated to dh, and a2 the (i+1)-attribute associated to \( \beta_{i+1}\)(dh). If set, the dynamic onmerge function of i+1-attributes is also called on a1 and a2.

If are_attributes_automatically_managed()==true, if a j-cell is disconnected in two j-cells during the operation, and if j-attributes are non void, Attribute_type<j>::type::On_split(a,a') is called with a the original j-attribute and a' the new j-attribute created due to the disconnection. If set, the dynamic onsplit function of j-attributes is also called on a and a'.

Advanced

If are_attributes_automatically_managed()==false, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.

See Also
CGAL::is_removable<CMap,i>
CGAL::insert_cell_0_in_cell_1<CMap>
CGAL::insert_cell_0_in_cell_2<CMap>
CGAL::insert_cell_1_in_cell_2<CMap>
CGAL::insert_dangling_cell_1_in_cell_2<CMap>
CGAL::insert_cell_2_in_cell_3<CMap,InputIterator>

#include <CGAL/Combinatorial_map_operations.h>