CGAL 6.1 - Combinatorial Maps

Loading...
Searching...
No Matches
List of all members
GenericMap Concept Reference
Reference Manual » Concepts

## Definition

The concept `GenericMap` defines a d-dimensional generic map. This concept is defined only to factorize the common notions between `CombinatorialMap` and `GeneralizedMap` concepts.

Refines
  `DefaultConstructible`

A generic map has a set of darts D, and functions \( f_0\), \( \ldots\), \( f_{d}\) that link these darts between them.

Has models
  `CGAL::Combinatorial_map<d,Items,Alloc>`
  `CGAL::Generalized_map<d,Items,Alloc>`

See also
  `CombinatorialMap`
  `GeneralizedMap`

## Types
typedef unspecified_type | Dart
| Dart type.
typedef unspecified_type | Dart_descriptor
| Dart descriptor type.
typedef unspecified_type | Dart_const_descriptor
| Dart const descriptor type.
typedef unspecified_type | Dart_info
| Information associated to each dart.
typedef unspecified_type | size_type
| Size type (an unsigned integral type).

## Types for Attributes
typedef unspecified_type | Attributes
| The tuple of cell attributes.
template<unsigned int i>
using | Attribute_type = unspecified_type
| `Attribute_type<i>::type` is the type of i-attributes, a model of `CellAttribute` concept.
template<unsigned int i>
using | Attribute_descriptor = unspecified_type
| `Attribute_descriptor<i>::type` is a descriptor to i-attributes.
template<unsigned int i>
using | Attribute_const_descriptor = unspecified_type
| `Attribute_descriptor<i>::type` is a const descriptor to i-attributes.

## Range Types
typedef unspecified_type | Dart_range
| Range of all the darts of the generic map.
typedef unspecified_type | Dart_const_range
| Const range of all the darts of the generic map.
template<unsigned int i>
using | Attribute_range = unspecified_type
| `Attribute_range<i>::type` is the range of all the i-attributes.
template<unsigned int i>
using | Attribute_const_range = unspecified_type
| `Attribute_const_range<i>::type` is the const range of all the i-attributes.
template<unsigned int... I>
using | Dart_of_orbit_range = unspecified_type
| Range of all the darts of the `<I...>` orbit.
template<unsigned int ... I>
using | Dart_of_orbit_const_range = unspecified_type
| Const range of all the darts of the `<I...>` orbit.
template<unsigned int i, unsigned int dim = dimension>
using | Dart_of_cell_range = unspecified_type
| Range of all the darts of an i-cell.
template<unsigned int i, unsigned int dim = dimension>
using | Dart_of_cell_const_range = unspecified_type
| Const range of all the darts of the i-cell.
template<unsigned int i, unsigned int j, unsigned int dim = dimension>
using | One_dart_per_incident_cell_range = unspecified_type
| Range of one dart of each i-cell incident to one j-cell.
template<unsigned int i, unsigned int j, unsigned int dim = dimension>
using | One_dart_per_incident_cell_const_range = unspecified_type
| Const range of one dart of each i-cell incident to one j-cell.
template<unsigned int i, unsigned int dim = dimension>
using | One_dart_per_cell_range = unspecified_type
| Range of one dart of each i-cell of the generic map.
template<unsigned int i, unsigned int dim = dimension>
using | One_dart_per_cell_const_range = unspecified_type
| Const range of one dart of each i-cell of the generic map.

## Constants
static const unsigned int | dimension
| The dimension d of the generic map.
static const size_type | NB_MARKS
| The number of available Boolean marks of the generic map.
static unspecified_type | null_descriptor
| A null descriptor.

## Creation
template<typename Map >
| GenericMap (const Map &bmap)
| Construct a new generic map from another one.

## Access Member Functions
bool | is_empty () const
| Returns `true` iff the generic map is empty, i.e. it contains no dart.
bool | is_without_boundary (unsigned int i) const
| Returns `true` iff the generic map is without i-boundary.
bool | is_without_boundary () const
| Returns `true` iff the generic map is without boundary in all dimensions.
size_type | number_of_darts () const
| Returns the number of darts in the generic map.
template<unsigned int i>
size_type | number_of_attributes () const
| Returns the number of i-attributes in the generic map.
size_type | upper_bound_on_dart_ids () const
| Returns an upper bound of the id of dart descriptors if indices are used or 0 otherwise.
template<unsigned int i>
size_type | upper_bound_on_attribute_ids () const
| Returns an upper bound of the id of i-attributes descriptors if indices are used or 0 otherwise.
bool | is_dart_used (Dart_const_descriptor d) const
| Returns `true` if `d` is a descriptor of a used dart (i.e. valid).
bool | is_free (Dart_const_descriptor d, unsigned int i) const
| Returns `true` iff dart `d` is i-free.
template<unsigned int i>
bool | is_free (Dart_const_descriptor d) const
| Returns `true` iff dart `d` is i-free.
int | highest_nonfree_dimension (Dart_const_descriptor d) const
| Returns the highest dimension i such that dart `d` is not i-free.
Dart_descriptor | other_extremity (Dart_descriptor d)
| Returns a descriptor to a dart belonging to the other vertex of the edge containing dart `d` (but not necessarily to the same edge).
Dart_const_descriptor | other_extremity (Dart_const_descriptor d) const
| Returns a const descriptor to a dart belonging to the other vertex of the edge containing dart `d`, when the dart is const (but not necessarily to the same edge).
Dart_descriptor | next (Dart_descriptor d)
| Returns a descriptor to a dart belonging to the next edge after `d`, that does not belong to the same 0-cell than `d` and that belongs to the same i-cell than `d`for each i, 2 \( \leq \) i \( \leq \) `dimension`.
Dart_const_descriptor | next (Dart_const_descriptor d) const
| Returns a const descriptor to a dart belonging to the next edge after `d`, that does not belong to the same 0-cell than `d` and that belongs to the same i-cell than `d`for each i, 2 \( \leq \) i \( \leq \) `dimension`.
Dart_descriptor | previous (Dart_descriptor d)
| Returns a descriptor to a dart belonging to the previous edge before `d`, that does not belong to the same 0-cell than `d` and that belongs to the same i-cell than `d`for each i, 2 \( \leq \) i \( \leq \) `dimension`.
Dart_const_descriptor | previous (Dart_const_descriptor d) const
| Returns a const descriptor to a dart belonging to the previous edge before `d`, that does not belong to the same 0-cell than `d` and that belongs to the same i-cell than `d`for each i, 2 \( \leq \) i \( \leq \) `dimension`.
template<unsigned int i>
Dart_descriptor | opposite (Dart_descriptor d)
| Returns a descriptor to a dart belonging to the opposite i-cell than `d`.
template<unsigned int i>
Dart_const_descriptor | opposite (Dart_const_descriptor d) const
| Returns a const descriptor to a dart belonging to the opposite i-cell than `d`.
std::ostream & | display_characteristics (std::ostream &os) const
| Displays on `os` the number of elements of the generic map.

## Attributes Access Member Functions
Dart_info & | info (Dart_descriptor d)
| Returns the information associated to dart `d`.
const Dart_info & | info (Dart_const_descriptor d) const
| Returns the information associated to dart `d`, when the dart is const.
template<unsigned int i>
Attribute_descriptor< i >::type | attribute (Dart_descriptor d)
| Returns a descriptor to the i-attribute associated to dart `d`.
template<unsigned int i>
Attribute_const_descriptor< i >::type | attribute (Dart_const_descriptor d) const
| Returns a const descriptor to the i-attribute associated to dart `d`, when the dart is const.
template<unsigned int i>
Dart_descriptor | dart_of_attribute (typename Attribute_descriptor< i >::type ah)
| Returns one dart of the cell associated to the i-attribute `*ah`.
template<unsigned int i>
Dart_const_descriptor | dart_of_attribute (typename Attribute_const_descriptor< i >::type ah) const
| Returns one dart of the cell associated to the const i-attribute `*ah`.
template<unsigned int i>
Attribute_type< i >::type::Info & | info_of_attribute (typename Attribute_descriptor< i >::type ah)
| Returns the information of the i-attribute `*ah`.
template<unsigned int i>
const Attribute_type< i >::type::Info & | info_of_attribute (typename Attribute_const_descriptor< i >::type ah) const
| Returns the information of the const i-attribute `*ah`.
template<unsigned int i>
Attribute_type< i >::type::Info & | info (Dart_descriptor adart)
| A shortcut for `info_of_attribute<i>``(``attribute<i>``(adart))`.
template<unsigned int i>
const Attribute_type< i >::type::Info & | info (Dart_const_descriptor adart) const
| A shortcut for `info_of_attribute<i>``(``attribute<i>``(adart))` for const descriptor.
template<unsigned int i>
Dart_descriptor & | dart (Dart_descriptor adart)
| A shortcut for `dart_of_attribute<i>``(``attribute<i>``(adart))`.
template<unsigned int i>
Dart_const_descriptor | dart (Dart_const_descriptor adart) const
| A shortcut for `dart_of_attribute<i>``(``attribute<i>``(adart))` for const descriptor.
template<unsigned int i>
bool | is_attribute_used (typename Attribute_const_descriptor< i >::type ah) const
| Returns `true` if ah points to a used i-attribute (i.e. valid).

## Transformations Between Descriptors and Instances
Dart_descriptor | dart_descriptor (Dart &d)
| Returns the dart descriptors of `d`.
Dart_const_descriptor | dart_descriptor (const Dart &d) const
| Returns the dart const descriptors of `d`.

## Range Access Member Functions
Dart_range & | darts ()
| Returns a range of all the darts in the generic map.
Dart_const_range & | darts () const
| Returns a const range of all the darts in the generic map.
template<unsigned int i>
Attribute_range< i >::type & | attributes ()
| Returns a range of all the i-attributes in the generic map.
template<unsigned int i>
Attribute_const_range< i >::type & | attributes () const
| Returns a const range of all the i-attributes in the generic map.
template<unsigned int ... I>
Dart_of_orbit_range | darts_of_orbit (Dart_descriptor d)
| Returns a range of all the darts of the orbit `<I...>(d)`.
template<unsigned int ... I>
Dart_of_orbit_const_range | darts_of_orbit (Dart_const_descriptor d) const
| Returns a const range of all the darts of the orbit `<I...>(d)`.
template<unsigned int i, unsigned int dim = dimension>
Dart_of_cell_range | darts_of_cell (Dart_descriptor d)
| Returns a range of all the darts of the i-cell containing `d`.
template<unsigned int i, unsigned int dim = dimension>
Dart_of_cell_const_range | darts_of_cell (Dart_const_descriptor d) const
| Returns a const range of all the darts of the i-cell containing `d`.
template<unsigned int i, unsigned int j, unsigned int dim = dimension>
One_dart_per_incident_cell_range | one_dart_per_incident_cell (Dart_descriptor d)
| Returns a range of one dart of each i-cell incident to the j-cell containing `d`.
template<unsigned int i, unsigned int j, unsigned int dim = dimension>
One_dart_per_incident_cell_const_range | one_dart_per_incident_cell (Dart_const_descriptor d) const
| Returns a const range of one dart of each i-cell incident to the j-cell containing `d`.
template<unsigned int i, unsigned int dim = dimension>
One_dart_per_cell_range | one_dart_per_cell ()
| Returns a range of one dart of each i-cell in the generic map.
template<unsigned int i, unsigned int dim = dimension>
One_dart_per_cell_const_range | one_dart_per_cell () const
| Returns a const range of one dart of each i-cell in the generic map.

## Modifiers
template<typename T1 >
Dart_descriptor | create_dart (T1 t1)
| Creates a new dart in the generic map, and returns the corresponding descriptor.
void | erase_dart (Dart_descriptor d)
| Removes `d` from the generic map.
template<unsigned int i, typename T1 >
Attribute_descriptor< i >::type | create_attribute (T1 t1)
| Creates a new i-attribute in the generic map, and returns the corresponding descriptor.
template<unsigned int i>
void | erase_attribute (Attribute_descriptor< i >::type ah)
| Removes the i-attribute `*ah` from the generic map.
template<unsigned int i>
void | set_attribute (Dart_descriptor d, Attribute_descriptor< i >::type a)
| Associates the i-attribute of all the darts of the i-cell containing `d` to `a`.
void | clear ()
| Deletes all the darts and all the attributes of the generic map.
GenericMap & | operator= (const GenericMap &bmap)
| Assignment operator.
void | swap (GenericMap &bmap)
| Swap the current generic map with `bmap`.

## Attributes management
bool | are_attributes_automatically_managed () const
| Returns the status of the management of the attributes of the generic map.
void | set_automatic_attributes_management (bool update_attributes)
| Set the status of the management of the attributes of the generic map.
void | correct_invalid_attributes ()
| Correct the invalid attributes of the generic map.

## Dynamic On-Merge/On-Split functors
template<int i>
boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & | onsplit_function ()
| Return the current dynamic on-split function associated with i-attributes.
template<int i>
const boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & | onsplit_function () const
| Return the current dynamic on-split function associated with i-attributes, when *this is const.
template<int i>
boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & | onmerge_function ()
| Return the current dynamic on-merge function associated with i-attributes.
template<int i>
const boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & | onmerge_function () const
| Return the current dynamic on-merge function associated with i-attributes, when *this is const.

## Boolean Marks
size_type | get_new_mark () const
| Reserves a new mark.
bool | is_reserved (size_type m) const
| Returns `true` iff `m` is a reserved mark of the generic map.
bool | is_marked (Dart_const_descriptor d, size_type m) const
| Returns `true` iff dart `d` is marked for `m`.
void | mark (Dart_const_descriptor d, size_type m) const
| Marks dart `d` for `m`.
void | unmark (Dart_const_descriptor d, size_type m) const
| Unmarks dart `d` for the mark `m`.
void | negate_mark (size_type m) const
| Inverse the mark `m` for all the darts of the generic map.
void | unmark_all (size_type m) const
| Unmarks all the darts of the generic map for `m`.
size_type | number_of_marked_darts (size_type m) const
| Returns the number of marked darts for `m`.
size_type | number_of_unmarked_darts (size_type m) const
| Return the number of unmarked darts for `m`.
void | free_mark (size_type m) const
| Frees mark `m`.

## Constructions
Dart_descriptor | make_combinatorial_hexahedron ()
| Creates a combinatorial hexahedron (six combinatorial quadrangles 2-sewn together), and adds it in the generic map.
Dart_descriptor | make_combinatorial_polygon (unsigned int lg)
| Creates a combinatorial polygon of length `lg` (a cycle of `lg` edges), and adds it in the generic map.
Dart_descriptor | make_combinatorial_tetrahedron ()
| Creates a combinatorial tetrahedron (four combinatorial triangles 2-sewn together), and adds it in the generic map.
Dart_descriptor | make_edge ()
| Creates an isolated edge (two darts sewn to represent one edge and two vertices) and adds it in the generic map.

## Operations
Dart_descriptor | insert_cell_0_in_cell_1 (Dart_descriptor d)
| Inserts a 0-cell in the 1-cell containing `d`.
Dart_descriptor | insert_cell_0_in_cell_2 (Dart_descriptor d)
| Inserts a 0-cell in the 2-cell containing `d`.
Dart_descriptor | insert_cell_1_in_cell_2 (Dart_descriptor d1, Dart_descriptor d2)
| Inserts a 1-cell in the 2-cell containing `d1` and `d2`.
Dart_descriptor | insert_cell_1_between_two_cells_2 (Dart_descriptor d1, Dart_descriptor d2)
| Inserts a 1-cell between the 2-cell containing `d1` and the one containing `d2`.
Dart_descriptor | insert_cell_1 (Dart_descriptor d1, Dart_descriptor d2)
| Call `insert_cell_1_in_cell_2()` if `is_insertable_cell_1_in_cell_2(d1, d2)`, otherwise call `insert_cell_1_between_two_cells_2()`.
template<class InputIterator >
Dart_descriptor | insert_cell_2_in_cell_3 (InputIterator afirst, InputIterator alast)
| Inserts a 2-cell along the path of 1-cells containing darts given by the range `[afirst,alast)`.
Dart_descriptor | insert_dangling_cell_1_in_cell_2 (Dart_descriptor d)
| Inserts a 1-cell in a the 2-cell containing `d`, the 1-cell being attached only by one of its extremity to the 0-cell containing `d`.
bool | is_insertable_cell_1_in_cell_2 (Dart_const_descriptor d1, Dart_const_descriptor d2)
| Returns `true` iff it is possible to insert a 1-cell in the generic map between `d1` and `d2`.
bool | is_insertable_cell_1_between_two_cells_2 (Dart_const_descriptor d1, Dart_const_descriptor d2)
| Returns `true` iff it is possible to insert a 1-cell in the generic map between `d1` and `d2`.
template<class InputIterator >
bool | is_insertable_cell_2_in_cell_3 (InputIterator afirst, InputIterator alast)
| Returns `true` iff it is possible to insert a 2-cell in the generic map along the path of darts given by the range `[afirst,alast)`.
template<unsigned int i>
bool | is_removable (Dart_const_descriptor d)
| Returns `true` iff the i-cell containing `d` can be removed.
template<unsigned int i>
size_type | remove_cell (Dart_descriptor d)
| Removes the i-cell containing `d`.

## Member Typedef Documentation

## ◆ Attribute_const_descriptor

template<unsigned int i>

using GenericMap::Attribute_const_descriptor = unspecified_type

`Attribute_descriptor<i>::type` is a const descriptor to i-attributes.

Precondition
  0 \( \leq \) i \( \leq \) `dimension` and i-attributes are non void.

Note
  It can be implemented using a nested template class.

## ◆ Attribute_const_range

template<unsigned int i>

using GenericMap::Attribute_const_range = unspecified_type

`Attribute_const_range<i>::type` is the const range of all the i-attributes.

`Attribute_const_range<i>::type` is a model of `ConstRange` concept, its iterator type is bidirectional and its value type is `Attribute_type<i>::type`.

Precondition
  0 \( \leq \) i \( \leq \) `dimension` and i-attributes are non void.

Note
  It can be implemented using a nested template class.

## ◆ Attribute_descriptor

template<unsigned int i>

using GenericMap::Attribute_descriptor = unspecified_type

`Attribute_descriptor<i>::type` is a descriptor to i-attributes.

Precondition
  0 \( \leq \) i \( \leq \) `dimension` and i-attributes are non void.

Note
  It can be implemented using a nested template class.

## ◆ Attribute_range

template<unsigned int i>

using GenericMap::Attribute_range = unspecified_type

`Attribute_range<i>::type` is the range of all the i-attributes.

`Attribute_range<i>::type` is a model of `Range` concept, its iterator type is bidirectional and its value type is `Attribute_type<i>::type` .

Precondition
  0 \( \leq \) i \( \leq \) `dimension` and i-attributes are non void.

Note
  It can be implemented using a nested template class.

## ◆ Attribute_type

template<unsigned int i>

using GenericMap::Attribute_type = unspecified_type

`Attribute_type<i>::type` is the type of i-attributes, a model of `CellAttribute` concept.

`Attribute_type<i>::type::Dart_descriptor` is equal to `Dart_descriptor`, and `Attribute_type<i>::type::Dart_const_descriptor` is equal to `Dart_const_descriptor`.

Precondition
  0 \( \leq \) i \( \leq \) `dimension` and i-attributes are non `void`.

Note
  It can be implemented using a nested template class.

## ◆ Attributes

typedef unspecified_type GenericMap::Attributes

The tuple of cell attributes.

It contains at most `dimension``+1` types (one for each possible cell of the generic map). Each type of the tuple must be either a model of the `CellAttribute` concept or `void`. The first type corresponds to 0-attributes, the second to 1-attributes and so on. If the i th type in the tuple is `void`, (i-1)-attributes are disabled. Otherwise, (i-1)-attributes are enabled and have the given type. If the size of the tuple is k, with k \( < \) `dimension``+1`, \( \forall \) i: k \( \leq \) i \( \leq \) `dimension`, i-attributes are disabled.

## ◆ Dart_const_descriptor

typedef unspecified_type GenericMap::Dart_const_descriptor

Dart const descriptor type.

When using indices, Dart_const_descriptor is equal to Dart_descriptor.

## ◆ Dart_const_range

typedef unspecified_type GenericMap::Dart_const_range

Const range of all the darts of the generic map.

This type is a model of `ConstRange` concept, its iterator type is bidirectional and its value type is `Dart`.

## ◆ Dart_of_cell_const_range

template<unsigned int i, unsigned int dim = dimension>

using GenericMap::Dart_of_cell_const_range = unspecified_type

Const range of all the darts of the i-cell.

Cells are considered in dim dimension, with 0 \( \leq \) i \( \leq \) dim+1 and 0 \( \leq \) dim \( \leq \) `dimension`. If i==dim+1, range of all the darts of a connected component. This type is a model of `ConstRange` concept, its iterator type is forward and its value type is `Dart`.

## ◆ Dart_of_cell_range

template<unsigned int i, unsigned int dim = dimension>

using GenericMap::Dart_of_cell_range = unspecified_type

Range of all the darts of an i-cell.

Cells are considered in dim dimension, with 0 \( \leq \) i \( \leq \) dim+1 and 0 \( \leq \) dim \( \leq \) `dimension`. If i==dim+1, range of all the darts of a connected component. This type is a model of `Range` concept, its iterator type is forward and its value type is `Dart`.

## ◆ Dart_of_orbit_const_range

template<unsigned int ... I>

using GenericMap::Dart_of_orbit_const_range = unspecified_type

Const range of all the darts of the `<I...>` orbit.

This type is a model of `ConstRange` concept, its iterator type is forward and its value type is `Dart`.

## ◆ Dart_of_orbit_range

template<unsigned int... I>

using GenericMap::Dart_of_orbit_range = unspecified_type

Range of all the darts of the `<I...>` orbit.

This type is a model of `Range` concept, its iterator type is forward and its value type is `Dart`.

## ◆ Dart_range

typedef unspecified_type GenericMap::Dart_range

Range of all the darts of the generic map.

This type is a model of `Range` concept, its iterator type is bidirectional and its value type is `Dart`.

## ◆ One_dart_per_cell_const_range

template<unsigned int i, unsigned int dim = dimension>

using GenericMap::One_dart_per_cell_const_range = unspecified_type

Const range of one dart of each i-cell of the generic map.

Cells are considered in dim dimension, with 0 \( \leq \) i \( \leq \) dim+1 and 0 \( \leq \) dim \( \leq \) `dimension`. If i==dim+1, consider each connected component instead of each i-cell. This type is a model of `ConstRange` concept, its iterator type is forward and its value type is `Dart`.

## ◆ One_dart_per_cell_range

template<unsigned int i, unsigned int dim = dimension>

using GenericMap::One_dart_per_cell_range = unspecified_type

Range of one dart of each i-cell of the generic map.

Cells are considered in dim dimension, with 0 \( \leq \) i \( \leq \) dim+1 and 0 \( \leq \) dim \( \leq \) `dimension`. If i==dim+1, consider each connected component instead of each i-cell. This type is a model of `Range` concept, its iterator type is forward and its value type is `Dart`.

## ◆ One_dart_per_incident_cell_const_range

template<unsigned int i, unsigned int j, unsigned int dim = dimension>

using GenericMap::One_dart_per_incident_cell_const_range = unspecified_type

Const range of one dart of each i-cell incident to one j-cell.

Cells are considered in dim dimension, with 0 \( \leq \) i \( \leq \) dim+1, 0 \( \leq \) j \( \leq \) dim+1 and 0 \( \leq \) dim \( \leq \) `dimension`. If i==dim+1, consider each connected component instead of each i-cell. If j==dim+1, consider one connected component instead of one j-cell. This type is a model of `ConstRange` concept, its iterator type is forward and its value type is `Dart`.

## ◆ One_dart_per_incident_cell_range

template<unsigned int i, unsigned int j, unsigned int dim = dimension>

using GenericMap::One_dart_per_incident_cell_range = unspecified_type

Range of one dart of each i-cell incident to one j-cell.

Cells are considered in dim dimension, with 0 \( \leq \) i \( \leq \) dim+1, 0 \( \leq \) j \( \leq \) dim+1 and 0 \( \leq \) dim \( \leq \) `dimension`. If i==dim+1, consider each connected component instead of each i-cell. If j==dim+1, consider one connected component instead of one j-cell. This type is a model of `Range` concept, its iterator type is forward and its value type is `Dart`.

## Constructor & Destructor Documentation

## ◆ GenericMap()

template<typename Map >

GenericMap::GenericMap | ( | const Map & | bmap | ) |

Construct a new generic map from another one.

The new generic map is created by copying the darts and the non void attributes of bmap. Map must be a model of `GenericMap` concept, which can be defined with a different dimension and/or different attributes than `*this`. In this case, only dimensions that are common to `bmap` and `*this`, and only non void i-attributes of `bmap` whose info type is the same to the info of non void i-attributes of `*this`, are copied.

## Member Function Documentation

## ◆ are_attributes_automatically_managed()

bool GenericMap::are_attributes_automatically_managed | ( |  | ) | const

Returns the status of the management of the attributes of the generic map.

`true` if the high level operations update the non void attributes (default value); `false` otherwise.

## ◆ attribute() [1/2]

template<unsigned int i>

Attribute_const_descriptor< i >::type GenericMap::attribute | ( | Dart_const_descriptor | d | ) | const

Returns a const descriptor to the i-attribute associated to dart `d`, when the dart is const.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, and i-attributes are non `void`.

## ◆ attribute() [2/2]

template<unsigned int i>

Attribute_descriptor< i >::type GenericMap::attribute | ( | Dart_descriptor | d | ) |

Returns a descriptor to the i-attribute associated to dart `d`.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, and i-attributes are non `void`.

## ◆ attributes() [1/2]

template<unsigned int i>

Attribute_range< i >::type & GenericMap::attributes | ( |  | ) |

Returns a range of all the i-attributes in the generic map.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, and i-attributes are non void.

## ◆ attributes() [2/2]

template<unsigned int i>

Attribute_const_range< i >::type & GenericMap::attributes | ( |  | ) | const

Returns a const range of all the i-attributes in the generic map.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, and i-attributes are non void.

## ◆ correct_invalid_attributes()

void GenericMap::correct_invalid_attributes | ( |  | ) |

Correct the invalid attributes of the generic map.

We can have invalid attribute either if we have called `set_automatic_attributes_management(false)` before to use some modification operations or if we have modified the generic map by using low level operations.

\( \forall i \), 0 \( \leq \) i \( \leq \) `dimension` such that the i-attributes are non void, \( \forall \) d \( \in \) `darts()`:

- if there exists a dart `d2` in the same i-cell than `d` with a different i-attribute, then the i-attribute of `d2` is set to the i-attribute of `d`;
- if there exists a dart `d2` in a different i-cell than `d` with the same i-attribute, then the i-attribute of all the darts in i-cell(`d`) is set to a new i-attribute (copy of the original attribute);
- ensures that `dart_of_attribute(d)` \( \in \) i-cell(`d`).

## ◆ create_attribute()

template<unsigned int i, typename T1 >

Attribute_descriptor< i >::type GenericMap::create_attribute | ( | T1 | t1 | ) |

Creates a new i-attribute in the generic map, and returns the corresponding descriptor.

Calls the constructor of i-attribute having `T1` as parameter. Overloads of this member function are defined that take from zero to nine arguments. With zero argument, `create_attribute<i>()` creates a new i-attribute by using the default constructor.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, and i-attributes are non void.

## ◆ create_dart()

template<typename T1 >

Dart_descriptor GenericMap::create_dart | ( | T1 | t1 | ) |

Creates a new dart in the generic map, and returns the corresponding descriptor.

Calls the constructor of dart having `T1` as parameter. A new dart is initialized to be i-free, \( \forall \) i: 0 \( \leq \) i \( \leq \) `dimension`, and to have no associated attribute for each non void attribute. Overloads of this member function are defined that take from zero to nine arguments. With zero argument, `create_dart()` creates a new dart by using the default constructor.

## ◆ dart() [1/2]

template<unsigned int i>

Dart_const_descriptor GenericMap::dart | ( | Dart_const_descriptor | adart | ) | const

A shortcut for `dart_of_attribute<i>``(``attribute<i>``(adart))` for const descriptor.

Precondition
  `attribute<i>(adart)!=nullptr`.

## ◆ dart() [2/2]

template<unsigned int i>

Dart_descriptor & GenericMap::dart | ( | Dart_descriptor | adart | ) |

A shortcut for `dart_of_attribute<i>``(``attribute<i>``(adart))`.

Precondition
  `attribute<i>(adart)!=nullptr`.

## ◆ dart_descriptor() [1/2]

Dart_const_descriptor GenericMap::dart_descriptor | ( | const Dart & | d | ) | const

Returns the dart const descriptors of `d`.

Precondition
  `d` \( \in \) `darts()`.

## ◆ dart_descriptor() [2/2]

Dart_descriptor GenericMap::dart_descriptor | ( | Dart & | d | ) |

Returns the dart descriptors of `d`.

Precondition
  `d` \( \in \) `darts()`.

## ◆ dart_of_attribute() [1/2]

template<unsigned int i>

Dart_const_descriptor GenericMap::dart_of_attribute | ( | typename Attribute_const_descriptor< i >::type | ah | ) | const

Returns one dart of the cell associated to the const i-attribute `*ah`.

`nullptr` if `Supports_cell_dart` of i-attributes is equal to `Tag_false`.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, i-attributes are non `void` and `ah`!=nullptr.

## ◆ dart_of_attribute() [2/2]

template<unsigned int i>

Dart_descriptor GenericMap::dart_of_attribute | ( | typename Attribute_descriptor< i >::type | ah | ) |

Returns one dart of the cell associated to the i-attribute `*ah`.

`nullptr` if `Supports_cell_dart` of i-attributes is equal to `Tag_false`.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, i-attributes are non `void` and `ah`!=nullptr.

## ◆ darts_of_cell() [1/2]

template<unsigned int i, unsigned int dim = dimension>

Dart_of_cell_const_range GenericMap::darts_of_cell | ( | Dart_const_descriptor | d | ) | const

Returns a const range of all the darts of the i-cell containing `d`.

The first element in the range points onto `d`. i-cells are considered in dim dimension. If i==dim+1, const range of all the darts of the connected component containing `d`.

Precondition
  Same as for the non const version.

## ◆ darts_of_cell() [2/2]

template<unsigned int i, unsigned int dim = dimension>

Dart_of_cell_range GenericMap::darts_of_cell | ( | Dart_descriptor | d | ) |

Returns a range of all the darts of the i-cell containing `d`.

The first element in the range points onto `d`. i-cells are considered in dim dimension. If i==dim+1, range of all the darts of the connected component containing `d`.

Precondition
  `d` \( \in \) `darts()`, 0 \( \leq \) i \( \leq \) dim+1 and 0 \( \leq \) dim \( \leq \) `dimension`.

## ◆ darts_of_orbit() [1/2]

template<unsigned int ... I>

Dart_of_orbit_const_range GenericMap::darts_of_orbit | ( | Dart_const_descriptor | d | ) | const

Returns a const range of all the darts of the orbit `<I...>(d)`.

The first element in the range points onto `d`.

Precondition
  Same as for the non const version.

## ◆ darts_of_orbit() [2/2]

template<unsigned int ... I>

Dart_of_orbit_range GenericMap::darts_of_orbit | ( | Dart_descriptor | d | ) |

Returns a range of all the darts of the orbit `<I...>(d)`.

The first element in the range points onto `d`.

Precondition
  `d` \( \in \) `darts()` and `I...` is a sequence of integers \( i_1\), \( \ldots\), \( i_k\), such that 0 \( \leq \) \( i_1\) \( < \) \( i_2\) \( < \) \( \ldots\) \( < \) \( i_k\) \( \leq \) `dimension`.

## ◆ display_characteristics()

std::ostream & GenericMap::display_characteristics | ( | std::ostream & | os | ) | const

Displays on `os` the number of elements of the generic map.

Its number of darts, its number of i-cells, for each i, 0 \( \leq \) i \( \leq \) `dimension`, and its number of connected components.

Example of output for a 3D combinatorial map containing two disjoint combinatorial tetrahedra:

`#Darts=24, #0-cells=8, #1-cells=12, #2-cells=8, #3-cells=2, #ccs=2`

## ◆ erase_attribute()

template<unsigned int i>

void GenericMap::erase_attribute | ( | Attribute_descriptor< i >::type | ah | ) |

Removes the i-attribute `*ah` from the generic map.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, i-attributes are non void, and `*ah` \( \in \) `attributes<i>()`.

## ◆ erase_dart()

void GenericMap::erase_dart | ( | Dart_descriptor | d | ) |

Removes `d` from the generic map.

Precondition
  `d` \( \in \) `darts()`.

## ◆ free_mark()

void GenericMap::free_mark | ( | size_type | m | ) | const

Frees mark `m`.

Precondition
  `is_reserved(m)`.

## ◆ get_new_mark()

size_type GenericMap::get_new_mark | ( |  | ) | const

Reserves a new mark.

Returns its index. If there is no more available free mark, throw the exception Exception_no_more_available_mark.

## ◆ highest_nonfree_dimension()

int GenericMap::highest_nonfree_dimension | ( | Dart_const_descriptor | d | ) | const

Returns the highest dimension i such that dart `d` is not i-free.

-1 if `d` is free for any dimension.

## ◆ info() [1/4]

template<unsigned int i>

const Attribute_type< i >::type::Info & GenericMap::info | ( | Dart_const_descriptor | adart | ) | const

A shortcut for `info_of_attribute<i>``(``attribute<i>``(adart))` for const descriptor.

Precondition
  `attribute<i>``(adart)!=nullptr`.

## ◆ info() [2/4]

const Dart_info & GenericMap::info | ( | Dart_const_descriptor | d | ) | const

Returns the information associated to dart `d`, when the dart is const.

Precondition
  `Dart_info` is not `void`.

## ◆ info() [3/4]

template<unsigned int i>

Attribute_type< i >::type::Info & GenericMap::info | ( | Dart_descriptor | adart | ) |

A shortcut for `info_of_attribute<i>``(``attribute<i>``(adart))`.

Precondition
  `attribute<i>``(adart)!=nullptr`.

## ◆ info() [4/4]

Dart_info & GenericMap::info | ( | Dart_descriptor | d | ) |

Returns the information associated to dart `d`.

Precondition
  `Dart_info` is not `void`.

## ◆ info_of_attribute() [1/2]

template<unsigned int i>

const Attribute_type< i >::type::Info & GenericMap::info_of_attribute | ( | typename Attribute_const_descriptor< i >::type | ah | ) | const

Returns the information of the const i-attribute `*ah`.

Defined only if `Info` of i-attributes is not `void`.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, i-attributes are non `void` and `ah`!=nullptr.

## ◆ info_of_attribute() [2/2]

template<unsigned int i>

Attribute_type< i >::type::Info & GenericMap::info_of_attribute | ( | typename Attribute_descriptor< i >::type | ah | ) |

Returns the information of the i-attribute `*ah`.

Defined only if `Info` of i-attributes is not `void`.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, i-attributes are non `void` and `ah`!=nullptr.

## ◆ insert_cell_0_in_cell_1()

Dart_descriptor GenericMap::insert_cell_0_in_cell_1 | ( | Dart_descriptor | d | ) |

Inserts a 0-cell in the 1-cell containing `d`.

Returns `next(d)`, a descriptor on one dart belonging to the new 0-cell.

Precondition
  `dimension` \( \geq\) 1 and `d` \( \in \) `darts()`.

See examples for combinatorial map in Figure 30.11 and for generalized map in Figure 31.13.

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 d and a' the new 1-attribute created during the operation. If set, the dynamic on-split 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 generic map can be no more valid after this operation.

See also
  `insert_cell_0_in_cell_2()`
  `insert_cell_1_in_cell_2()`
  `insert_cell_1_between_two_cells_2()`
  `insert_dangling_cell_1_in_cell_2()`
  `insert_cell_2_in_cell_3<InputIterator>()`
  `remove_cell<i>()`

## ◆ insert_cell_0_in_cell_2()

Dart_descriptor GenericMap::insert_cell_0_in_cell_2 | ( | Dart_descriptor | d | ) |

Inserts a 0-cell in the 2-cell containing `d`.

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

Precondition
  `dimension` \( \geq\) 2 and `d` \( \in \) `darts()`.

See examples for combinatorial map in Figure 30.12 and for generalized map in Figure 31.14.

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 `d` and a' each new 2-attribute created during the operation. If set, the dynamic on-split 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 generic map can be no more valid after this operation.

See also
  `insert_cell_0_in_cell_2()`
  `insert_cell_1_in_cell_2()`
  `insert_cell_1_between_two_cells_2()`
  `insert_dangling_cell_1_in_cell_2()`
  `insert_cell_2_in_cell_3<InputIterator>()`
  `remove_cell<i>()`

## ◆ insert_cell_1()

Dart_descriptor GenericMap::insert_cell_1 | ( | Dart_descriptor | d1,
|  | Dart_descriptor | d2
| ) |  |

Call `insert_cell_1_in_cell_2()` if `is_insertable_cell_1_in_cell_2(d1, d2)`, otherwise call `insert_cell_1_between_two_cells_2()`.

See also
  `insert_cell_1_in_cell_2()`
  `insert_cell_1_between_two_cells_2()`
  `is_insertable_cell_1_in_cell_2()`

## ◆ insert_cell_1_between_two_cells_2()

Dart_descriptor GenericMap::insert_cell_1_between_two_cells_2 | ( | Dart_descriptor | d1,
|  | Dart_descriptor | d2
| ) |  |

Inserts a 1-cell between the 2-cell containing `d1` and the one containing `d2`.

Returns `previous(d1)`, a descriptor on one dart belonging to the new 1-cell.

Precondition
  `is_insertable_cell_1_between_two_cells_2(d1,d2)`.

If `are_attributes_automatically_managed()``==true`, call `Attribute_type<i>::type::On_merge`(a,a') is called for all enabled i-attributes, for i>=2, with a the original 2-attribute associated with `d1` and a' the original 2-attribute associated with `d2`. If set, the dynamic on-merge function of i-attributes is also called on a and a'.

Advanced

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

See also
  `is_insertable_cell_1_between_two_cells_2()`
  `insert_cell_0_in_cell_1()`
  `insert_cell_0_in_cell_2()`
  `insert_cell_1_in_cell_2()`
  `insert_dangling_cell_1_in_cell_2()`
  `insert_cell_2_in_cell_3<InputIterator>()`
  `remove_cell<i>()`

## ◆ insert_cell_1_in_cell_2()

Dart_descriptor GenericMap::insert_cell_1_in_cell_2 | ( | Dart_descriptor | d1,
|  | Dart_descriptor | d2
| ) |  |

Inserts a 1-cell in the 2-cell containing `d1` and `d2`.

Returns `previous(d1)`, a descriptor on one dart belonging to the new 1-cell.

Precondition
  `is_insertable_cell_1_in_cell_2(d1,d2)`.

See examples for combinatorial map in Figure 30.13 and for generalized map in Figure 31.15.

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 `d1` and a' the new 2-attribute created during the operation. If set, the dynamic on-split 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 generic map can be no more valid after this operation.

See also
  `is_insertable_cell_1_in_cell_2()`
  `insert_cell_0_in_cell_1()`
  `insert_cell_0_in_cell_2()`
  `insert_cell_1_between_two_cells_2()`
  `insert_dangling_cell_1_in_cell_2()`
  `insert_cell_2_in_cell_3<InputIterator>()`
  `remove_cell<i>()`

## ◆ insert_cell_2_in_cell_3()

template<class InputIterator >

Dart_descriptor GenericMap::insert_cell_2_in_cell_3 | ( | InputIterator | afirst,
|  | InputIterator | alast
| ) |  |

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

Returns `opposite<2>(*afirst)`, a descriptor on one dart belonging to the new 2-cell.

Precondition
  `is_insertable_cell_2_in_cell_3(afirst,alast)`.

See examples for combinatorial map in Figure 30.14 and for generalized map in Figure 31.16.

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 `d` and a' the new 3-attribute created during the operation. If set, the dynamic on-split 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 generic map can be no more valid after this operation.

See also
  `is_insertable_cell_2_in_cell_3<InputIterator>()`
  `insert_cell_0_in_cell_1()`
  `insert_cell_0_in_cell_2()`
  `insert_cell_1_in_cell_2()`
  `insert_cell_1_between_two_cells_2()`
  `insert_dangling_cell_1_in_cell_2()`
  `remove_cell<i>()`

## ◆ insert_dangling_cell_1_in_cell_2()

Dart_descriptor GenericMap::insert_dangling_cell_1_in_cell_2 | ( | Dart_descriptor | d | ) |

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

Returns `previous(d)`, a descriptor on the dart belonging to the new 1-cell and to the new 0-cell.

Precondition
  `dimension` \( \geq\) 2 and `d` \( \in \) `darts()`.

See examples for combinatorial map in Figure 30.13 and for generalized map in Figure 31.15.

Advanced

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

See also
  `insert_cell_0_in_cell_1()`
  `insert_cell_0_in_cell_2()`
  `insert_cell_1_in_cell_2()`
  `insert_cell_1_between_two_cells_2()`
  `insert_cell_2_in_cell_3<InputIterator>()`
  `remove_cell<i>()`

## ◆ is_attribute_used()

template<unsigned int i>

bool GenericMap::is_attribute_used | ( | typename Attribute_const_descriptor< i >::type | ah | ) | const

Returns `true` if ah points to a used i-attribute (i.e. valid).

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, and i-attributes are non `void`.

## ◆ is_free() [1/2]

template<unsigned int i>

bool GenericMap::is_free | ( | Dart_const_descriptor | d | ) | const

Returns `true` iff dart `d` is i-free.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`.

## ◆ is_free() [2/2]

bool GenericMap::is_free | ( | Dart_const_descriptor | d,
|  | unsigned int | i
| ) |  | const

Returns `true` iff dart `d` is i-free.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`.

## ◆ is_insertable_cell_1_between_two_cells_2()

bool GenericMap::is_insertable_cell_1_between_two_cells_2 | ( | Dart_const_descriptor | d1,
|  | Dart_const_descriptor | d2
| ) |  |

Returns `true` iff it is possible to insert a 1-cell in the generic map between `d1` and `d2`.

This is possible if `d1` \( \neq \) `d2` and `d1` can not be reached from `d2` by using some `previous` and `next` calls.

Precondition
  `dimension` \( \geq\) 2, `d1` \( \in \) `darts()`, and `d2` \( \in \) `darts()`.

See also
  `insert_cell_1_between_two_cells_2()`

## ◆ is_insertable_cell_1_in_cell_2()

bool GenericMap::is_insertable_cell_1_in_cell_2 | ( | Dart_const_descriptor | d1,
|  | Dart_const_descriptor | d2
| ) |  |

Returns `true` iff it is possible to insert a 1-cell in the generic map between `d1` and `d2`.

This is possible if `d1` \( \neq \) `d2` and `d1` can be reached from `d2` by using some `previous` and `next` calls.

Precondition
  `dimension` \( \geq\) 2, `d1` \( \in \) `darts()`, and `d2` \( \in \) `darts()`.

See also
  `insert_cell_1_in_cell_2()`
  `is_insertable_cell_2_in_cell_3<InputIterator>()`

## ◆ is_insertable_cell_2_in_cell_3()

template<class InputIterator >

bool GenericMap::is_insertable_cell_2_in_cell_3 | ( | InputIterator | afirst,
|  | InputIterator | alast
| ) |  |

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

The 2-cell can be inserted iff the ordered list of darts form a closed path of edges inside a same volume.

Precondition
  `dimension` \( \geq\) 3.

See also
  `insert_cell_2_in_cell_3<InputIterator>()`
  `is_insertable_cell_1_in_cell_2()`

## ◆ is_marked()

bool GenericMap::is_marked | ( | Dart_const_descriptor | d,
|  | size_type | m
| ) |  | const

Returns `true` iff dart `d` is marked for `m`.

Precondition
  `is_reserved(m)` and `d` \( \in \) `darts()`.

## ◆ is_removable()

template<unsigned int i>

bool GenericMap::is_removable | ( | Dart_const_descriptor | d | ) |

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

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

Precondition
  0 \( \leq \) `i` \( \leq \) `dimension` and `d` \( \in \) `darts()`.

See also
  `remove_cell<i>()`

## ◆ is_reserved()

bool GenericMap::is_reserved | ( | size_type | m | ) | const

Returns `true` iff `m` is a reserved mark of the generic map.

Precondition
  0 \( \leq \) m \( < \) `NB_MARKS`.

## ◆ is_without_boundary()

bool GenericMap::is_without_boundary | ( | unsigned int | i | ) | const

Returns `true` iff the generic map is without i-boundary.

The map is without i-boundary if there is no `i`-free dart.

Precondition
  1 \( \leq \) i \( \leq \) `dimension`.

## ◆ make_combinatorial_hexahedron()

Dart_descriptor GenericMap::make_combinatorial_hexahedron | ( |  | ) |

Creates a combinatorial hexahedron (six combinatorial quadrangles 2-sewn together), and adds it in the generic map.

Returns a descriptor on one dart of this combinatorial hexahedron.

Precondition
  `dimension` \(\geq\) 2.

See also
  `make_edge()`
  `make_combinatorial_polygon()`
  `make_combinatorial_tetrahedron()`

## ◆ make_combinatorial_polygon()

Dart_descriptor GenericMap::make_combinatorial_polygon | ( | unsigned int | lg | ) |

Creates a combinatorial polygon of length `lg` (a cycle of `lg` edges), and adds it in the generic map.

Returns a descriptor on one dart of this combinatorial polygon.

Precondition
  `dimension` \( \geq\) 1 and `lg` \( >\) 0.

See also
  `make_edge()`
  `make_combinatorial_tetrahedron()`
  `make_combinatorial_hexahedron()`

## ◆ make_combinatorial_tetrahedron()

Dart_descriptor GenericMap::make_combinatorial_tetrahedron | ( |  | ) |

Creates a combinatorial tetrahedron (four combinatorial triangles 2-sewn together), and adds it in the generic map.

Returns a descriptor on one dart of this combinatorial tetrahedron.

Precondition
  `dimension` \( \geq\) 2.

See also
  `make_edge()`
  `make_combinatorial_polygon()`
  `make_combinatorial_hexahedron()`

## ◆ make_edge()

Dart_descriptor GenericMap::make_edge | ( |  | ) |

Creates an isolated edge (two darts sewn to represent one edge and two vertices) and adds it in the generic map.

Returns a descriptor on one dart of this edge.

Precondition
  `dimension` \( \geq\) 2.

See also
  `make_combinatorial_polygon()`
  `make_combinatorial_tetrahedron()`
  `make_combinatorial_hexahedron()`

## ◆ mark()

void GenericMap::mark | ( | Dart_const_descriptor | d,
|  | size_type | m
| ) |  | const

Marks dart `d` for `m`.

Precondition
  `is_reserved(m)` and `d` \( \in \) `darts()`.

## ◆ negate_mark()

void GenericMap::negate_mark | ( | size_type | m | ) | const

Inverse the mark `m` for all the darts of the generic map.

All the marked darts become unmarked and all the unmarked darts become marked.

Precondition
  `is_reserved(m)`.

## ◆ number_of_attributes()

template<unsigned int i>

size_type GenericMap::number_of_attributes | ( |  | ) | const

Returns the number of i-attributes in the generic map.

Precondition
  0 \( \leq \) i \( \leq \) `dimension`, and i-attributes are non void.

## ◆ number_of_marked_darts()

size_type GenericMap::number_of_marked_darts | ( | size_type | m | ) | const

Returns the number of marked darts for `m`.

Precondition
  `is_reserved(m)`.

## ◆ number_of_unmarked_darts()

size_type GenericMap::number_of_unmarked_darts | ( | size_type | m | ) | const

Return the number of unmarked darts for `m`.

Precondition
  `is_reserved(m)`.

## ◆ one_dart_per_cell() [1/2]

template<unsigned int i, unsigned int dim = dimension>

One_dart_per_cell_range GenericMap::one_dart_per_cell | ( |  | ) |

Returns a range of one dart of each i-cell in the generic map.

Cells are considered in dim dimension. If i==dim+1, range of one dart of each connected component in the generic map.

Precondition
  0 \( \leq \) i \( \leq \) dim+1 and 0 \( \leq \) dim \( \leq \) `dimension`.

## ◆ one_dart_per_cell() [2/2]

template<unsigned int i, unsigned int dim = dimension>

One_dart_per_cell_const_range GenericMap::one_dart_per_cell | ( |  | ) | const

Returns a const range of one dart of each i-cell in the generic map.

Cells are considered in dim dimension. If i==dim+1, const range of one dart of each connected component in the generic map.

Precondition
  Same as for the non const version.

## ◆ one_dart_per_incident_cell() [1/2]

template<unsigned int i, unsigned int j, unsigned int dim = dimension>

One_dart_per_incident_cell_const_range GenericMap::one_dart_per_incident_cell | ( | Dart_const_descriptor | d | ) | const

Returns a const range of one dart of each i-cell incident to the j-cell containing `d`.

The first element in the range points onto `d`. Cells are considered in dim dimension. If i==dim+1, consider each connected component instead of each i-cell. If j==dim+1, consider the connected component containing `d` instead of the j-cell.

Precondition
  Same as for the non const version.

## ◆ one_dart_per_incident_cell() [2/2]

template<unsigned int i, unsigned int j, unsigned int dim = dimension>

One_dart_per_incident_cell_range GenericMap::one_dart_per_incident_cell | ( | Dart_descriptor | d | ) |

Returns a range of one dart of each i-cell incident to the j-cell containing `d`.

The first element in the range points onto `d`. Cells are considered in dim dimension. If i==dim+1, consider each connected component instead of each i-cell. If j==dim+1, consider the connected component containing `d` instead of the j-cell.

Precondition
  `d` \( \in \) `darts()`, 0 \( \leq \) i \( \leq \) dim+1, 0 \( \leq \) j \( \leq \) dim+1 and 0 \( \leq \) dim \( \leq \) `dimension`.

## ◆ onmerge_function() [1/2]

template<int i>

boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & GenericMap::onmerge_function | ( |  | ) |

Return the current dynamic on-merge function associated with i-attributes.

This is a boost::function returning void and having two references to `Attribute_type<i>::type` as parameters. The on-merge function is returned by reference so that we can modify it.

## ◆ onmerge_function() [2/2]

template<int i>

const boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & GenericMap::onmerge_function | ( |  | ) | const

Return the current dynamic on-merge function associated with i-attributes, when *this is const.

This is a boost::function returning void and having two references to `Attribute_type<i>::type` as parameters.

## ◆ onsplit_function() [1/2]

template<int i>

boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & GenericMap::onsplit_function | ( |  | ) |

Return the current dynamic on-split function associated with i-attributes.

This is a boost::function returning void and having two references to `Attribute_type<i>::type` as parameters. The on-split function is returned by reference so that we can modify it.

## ◆ onsplit_function() [2/2]

template<int i>

const boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & GenericMap::onsplit_function | ( |  | ) | const

Return the current dynamic on-split function associated with i-attributes, when *this is const.

This is a boost::function returning void and having two references to `Attribute_type<i>::type` as parameters.

## ◆ operator=()

GenericMap & GenericMap::operator= | ( | const GenericMap & | bmap | ) |

Assignment operator.

All darts and attributes are duplicated, and the former generic map is deleted.

## ◆ opposite() [1/2]

template<unsigned int i>

Dart_const_descriptor GenericMap::opposite | ( | Dart_const_descriptor | d | ) | const

Returns a const descriptor to a dart belonging to the opposite i-cell than `d`.

This dart does not belong to the same 0-cell than `d`, nor to the same i-cell, but belongs to the same i-cell than `d`for each j, 2 \( \leq \) j \( \leq \) `dimension`, j \( \neq \) i.

Precondition
  2 \( \leq \) i \( \leq \) `dimension`.

## ◆ opposite() [2/2]

template<unsigned int i>

Dart_descriptor GenericMap::opposite | ( | Dart_descriptor | d | ) |

Returns a descriptor to a dart belonging to the opposite i-cell than `d`.

This dart does not belong to the same 0-cell than `d`, nor to the same i-cell, but belongs to the same i-cell than `d`for each j, 2 \( \leq \) j \( \leq \) `dimension`, j \( \neq \) i.

Precondition
  2 \( \leq \) i \( \leq \) `dimension`.

## ◆ other_extremity() [1/2]

Dart_const_descriptor GenericMap::other_extremity | ( | Dart_const_descriptor | d | ) | const

Returns a const descriptor to a dart belonging to the other vertex of the edge containing dart `d`, when the dart is const (but not necessarily to the same edge).

`null_descriptor` if such a dart does not exist.

## ◆ other_extremity() [2/2]

Dart_descriptor GenericMap::other_extremity | ( | Dart_descriptor | d | ) |

Returns a descriptor to a dart belonging to the other vertex of the edge containing dart `d` (but not necessarily to the same edge).

`null_descriptor` if such a dart does not exist.

## ◆ remove_cell()

template<unsigned int i>

size_type GenericMap::remove_cell | ( | Dart_descriptor | d | ) |

Removes the i-cell containing `d`.

Returns the number of darts removed from the generic map.

Precondition
  `is_removable<i>(d)`.

See examples in Figure 30.11, Figure 30.13 and Figure 30.14.

If `are_attributes_automatically_managed()``==true`, if `i` \( < \) `dimension`, and i+1-attributes are non `void`, and if there are two distinct (i+1)-cells around dart `d`, `Attribute_type<i+1>::type::On_merge`(a1,a2) is called, with a1 the (i+1)-attribute associated to `d`, and a2 the (i+1)-attribute associated to \( \beta_{i+1}\)(d). If set, the dynamic on-merge 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 on-split 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 generic map can be no more valid after this operation.

See also
  `is_removable<i>()`
  `insert_cell_0_in_cell_1()`
  `insert_cell_0_in_cell_2()`
  `insert_cell_1_in_cell_2()`
  `insert_cell_1_between_two_cells_2()`
  `insert_dangling_cell_1_in_cell_2()`
  `insert_cell_2_in_cell_3<InputIterator>()`

## ◆ set_attribute()

template<unsigned int i>

void GenericMap::set_attribute | ( | Dart_descriptor | d,
|  | Attribute_descriptor< i >::type | a
| ) |  |

Associates the i-attribute of all the darts of the i-cell containing `d` to `a`.

Precondition
  `d` \( \in \) `darts()`, 0 \( \leq \) i \( \leq \) `dimension`, i-attributes are non void, and `*ah` \( \in \) `attributes<i>()`.

## ◆ set_automatic_attributes_management()

void GenericMap::set_automatic_attributes_management | ( | bool | update_attributes | ) |

Set the status of the management of the attributes of the generic map.

Advanced

After calling `set_automatic_attributes_management(false)`, all high level operations will not update non void attributes, until the call of `set_automatic_attributes_management(true)`. The call of `set_automatic_attributes_management(true)` call the `correct_invalid_attributes()` function.

## ◆ swap()

void GenericMap::swap | ( | GenericMap & | bmap | ) |

Swap the current generic map with `bmap`.

There is no copy of darts and attributes thus this method runs in constant time.

## ◆ unmark()

void GenericMap::unmark | ( | Dart_const_descriptor | d,
|  | size_type | m
| ) |  | const

Unmarks dart `d` for the mark `m`.

Precondition
  `is_reserved(m)` and `d` \( \in \) `darts()`.

## ◆ unmark_all()

void GenericMap::unmark_all | ( | size_type | m | ) | const

Unmarks all the darts of the generic map for `m`.

Precondition
  `is_reserved(m)`.

## Member Data Documentation

## ◆ null_descriptor

unspecified_type GenericMap::null_descriptor
| static

A null descriptor.

This descriptor is not valid and should not be used to access a dart or an attribute.