CGAL 5.0.3 - Combinatorial Maps
|
The concept GenericMap
defines a d-dimensional generic map. This concept is defined only to factorize the common notions between CombinatorialMap
and GeneralizedMap
concepts.
A generic map has a set of darts D, and functions \( f_0\), \( \ldots\), \( f_{d}\) that link these darts between them.
CombinatorialMap
GeneralizedMap
Creation | |
template<typename Map > | |
GenericMap (const Map &bmap) | |
Construct a new generic map from another one. More... | |
Types | |
typedef unspecified_type | Dart |
Dart type. | |
typedef unspecified_type | Dart_handle |
Dart handle type. More... | |
typedef unspecified_type | Dart_const_handle |
Dart const handle type. More... | |
typedef unspecified_type | Dart_info |
Information associated to each dart. | |
typedef unspecified_type | size_type |
Size type (an unsigned integral type). | |
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. | |
Types for Attributes | |
typedef unspecified_type | Attributes |
The tuple of cell attributes. More... | |
template<unsigned int i> | |
using | Attribute_type = unspecified_type |
Attribute_type<i>::type is the type of i-attributes, a model of CellAttribute concept. More... | |
template<unsigned int i> | |
using | Attribute_handle = unspecified_type |
Attribute_handle<i>::type is a handle to i-attributes. More... | |
template<unsigned int i> | |
using | Attribute_const_handle = unspecified_type |
Attribute_handle<i>::type is a const handle to i-attributes. More... | |
Range Types | |
typedef unspecified_type | Dart_range |
Range of all the darts of the generic map. More... | |
typedef unspecified_type | Dart_const_range |
Const range of all the darts of the generic map. More... | |
template<unsigned int i> | |
using | Attribute_range = unspecified_type |
Attribute_range<i>::type is the range of all the i-attributes. More... | |
template<unsigned int i> | |
using | Attribute_const_range = unspecified_type |
Attribute_const_range<i>::type is the const range of all the i-attributes. More... | |
template<unsigned int... I> | |
using | Dart_of_orbit_range = unspecified_type |
Range of all the darts of the <I...> orbit. More... | |
template<unsigned int ... I> | |
using | Dart_of_orbit_const_range = unspecified_type |
Const range of all the darts of the <I...> orbit. More... | |
template<unsigned int i, unsigned int dim = dimension> | |
using | Dart_of_cell_range = unspecified_type |
Range of all the darts of an i-cell. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
bool | is_dart_used (Dart_const_handle dh) const |
Returns true if dh points to a used dart (i.e. valid). | |
bool | is_free (Dart_const_handle dh, unsigned int i) const |
Returns true iff dart *dh is i-free. More... | |
template<unsigned int i> | |
bool | is_free (Dart_const_handle dh) const |
Returns true iff dart *dh is i-free. More... | |
int | highest_nonfree_dimension (Dart_const_handle dh) const |
Returns the highest dimension i such that dart *dh is not i-free. More... | |
Dart_handle | other_extremity (Dart_handle dh) |
Returns a handle to a dart belonging to the other vertex of the edge containing dart *dh (but not necessarily to the same edge). More... | |
Dart_const_handle | other_extremity (Dart_const_handle dh) const |
Returns a const handle to a dart belonging to the other vertex of the edge containing dart *dh , when the dart is const (but not necessarily to the same edge). More... | |
Dart_handle | next (Dart_handle dh) |
Returns a handle to a dart belonging to the next edge after *dh , that does not belong to the same 0-cell than *dh and that belongs to the same i-cell than *dh for each i, 2 \( \leq \) i \( \leq \) dimension . | |
Dart_const_handle | next (Dart_const_handle dh) const |
Returns a const handle to a dart belonging to the next edge after *dh , that does not belong to the same 0-cell than *dh and that belongs to the same i-cell than *dh for each i, 2 \( \leq \) i \( \leq \) dimension . | |
Dart_handle | previous (Dart_handle dh) |
Returns a handle to a dart belonging to the previous edge begore *dh , that does not belong to the same 0-cell than *dh and that belongs to the same i-cell than *dh for each i, 2 \( \leq \) i \( \leq \) dimension . | |
Dart_const_handle | previous (Dart_const_handle dh) const |
Returns a const handle to a dart belonging to the previous edge begore *dh , that does not belong to the same 0-cell than *dh and that belongs to the same i-cell than *dh for each i, 2 \( \leq \) i \( \leq \) dimension . | |
template<unsigned int i> | |
Dart_handle | opposite (Dart_handle dh) |
Returns a handle to a dart belonging to the opposite i-cell than *dh . More... | |
template<unsigned int i> | |
Dart_const_handle | opposite (Dart_const_handle dh) const |
Returns a const handle to a dart belonging to the opposite i-cell than *dh . More... | |
std::ostream & | display_characteristics (std::ostream &os) const |
Displays on os the number of elements of the generic map. More... | |
Attributes Access Member Functions | |
Dart_info & | info (Dart_handle dh) |
Returns the information associated to dart *dh . More... | |
const Dart_info & | info (Dart_const_handle dh) const |
Returns the information associated to dart *dh , when the dart is const. More... | |
template<unsigned int i> | |
Attribute_handle< i >::type | attribute (Dart_handle dh) |
Returns a handle to the i-attribute associated to dart *dh . More... | |
template<unsigned int i> | |
Attribute_const_handle< i >::type | attribute (Dart_const_handle dh) const |
Returns a const handle to the i-attribute associated to dart *dh , when the dart is const. More... | |
template<unsigned int i> | |
Dart_handle | dart_of_attribute (typename Attribute_handle< i >::type ah) |
Returns one dart of the cell associated to the i-attribute *ah . More... | |
template<unsigned int i> | |
Dart_const_handle | dart_of_attribute (typename Attribute_const_handle< i >::type ah) const |
Returns one dart of the cell associated to the const i-attribute *ah . More... | |
template<unsigned int i> | |
Attribute_type< i >::type::Info & | info_of_attribute (typename Attribute_handle< i >::type ah) |
Returns the information of the i-attribute *ah . More... | |
template<unsigned int i> | |
const Attribute_type< i >::type::Info & | info_of_attribute (typename Attribute_const_handle< i >::type ah) const |
Returns the information of the const i-attribute *ah . More... | |
template<unsigned int i> | |
Attribute_type< i >::type::Info & | info (Dart_handle adart) |
A shorcut for info_of_attribute<i> ( attribute<i> (adart)) . More... | |
template<unsigned int i> | |
const Attribute_type< i >::type::Info & | info (Dart_const_handle adart) const |
A shorcut for info_of_attribute<i> ( attribute<i> (adart)) for const handle. More... | |
template<unsigned int i> | |
Dart_handle & | dart (Dart_handle adart) |
A shorcut for dart_of_attribute<i> ( attribute<i> (adart)) . More... | |
template<unsigned int i> | |
Dart_const_handle | dart (Dart_const_handle adart) const |
A shorcut for dart_of_attribute<i> ( attribute<i> (adart)) for const handle. More... | |
template<unsigned int i> | |
bool | is_attribute_used (typename Attribute_const_handle< i >::type ah) const |
Returns true if ah points to a used i-attribute (i.e. valid). More... | |
Transformations Between Handles and Instances | |
Dart_handle | dart_handle (Dart &d) |
Returns the dart handle of d . More... | |
Dart_const_handle | dart_handle (const Dart &d) const |
Returns the dart const handle of d . More... | |
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. More... | |
template<unsigned int i> | |
Attribute_const_range< i >::type & | attributes () const |
Returns a const range of all the i-attributes in the generic map. More... | |
template<unsigned int ... I> | |
Dart_of_orbit_range | darts_of_orbit (Dart_handle dh) |
Returns a range of all the darts of the orbit <I...>(*dh) . More... | |
template<unsigned int ... I> | |
Dart_of_orbit_const_range | darts_of_orbit (Dart_const_handle dh) const |
Returns a const range of all the darts of the orbit <I...>(*dh) . More... | |
template<unsigned int i, unsigned int dim = dimension> | |
Dart_of_cell_range | darts_of_cell (Dart_handle dh) |
Returns a range of all the darts of the i-cell containing *dh . More... | |
template<unsigned int i, unsigned int dim = dimension> | |
Dart_of_cell_const_range | darts_of_cell (Dart_const_handle dh) const |
Returns a const range of all the darts of the i-cell containing *dh . More... | |
template<unsigned int i, unsigned int j, unsigned int dim = dimension> | |
One_dart_per_incident_cell_range | one_dart_per_incident_cell (Dart_handle dh) |
Returns a range of one dart of each i-cell incident to the j-cell containing *dh . More... | |
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_handle dh) const |
Returns a const range of one dart of each i-cell incident to the j-cell containing *dh . More... | |
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. More... | |
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. More... | |
Modifiers | |
template<typename T1 > | |
Dart_handle | create_dart (T1 t1) |
Creates a new dart in the generic map, and returns the corresponding handle. More... | |
void | erase_dart (Dart_handle dh) |
Removes *dh from the generic map. More... | |
template<unsigned int i, typename T1 > | |
Attribute_handle< i >::type | create_attribute (T1 t1) |
Creates a new i-attribute in the generic map, and returns the corresponding handle. More... | |
template<unsigned int i> | |
void | erase_attribute (Attribute_handle< i >::type ah) |
Removes the i-attribute *ah from the generic map. More... | |
template<unsigned int i> | |
void | set_attribute (Dart_handle dh, Attribute_handle< i >::type ah) |
Associates the i-attribute of all the darts of the i-cell containing *dh to *ah . More... | |
void | clear () |
Deletes all the darts and all the attributes of the generic map. | |
GenericMap & | operator= (const GenericMap &bmap) |
Assignment operator. More... | |
void | swap (GenericMap &bmap) |
Swap the current generic map with bmap . More... | |
Attributes management | |
bool | are_attributes_automatically_managed () const |
Returns the status of the management of the attributes of the generic map. More... | |
void | set_automatic_attributes_management (bool update_attributes) |
Set the status of the managment of the attributes of the generic map. More... | |
void | correct_invalid_attributes () |
Correct the invalid attributes of the generic map. More... | |
Dynamic Onmerge/Onsplit functors | |
template<int i> | |
boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & | onsplit_function () |
Return the current dynamic onsplit function associated with i-attributes. More... | |
template<int i> | |
const boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & | onsplit_function () const |
Return the current dynamic onsplit function associated with i-attributes, when *this is const. More... | |
template<int i> | |
boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & | onmerge_function () |
Return the current dynamic onmerge function associated with i-attributes. More... | |
template<int i> | |
const boost::function< void(typename Attribute_type< i >::type &, typename Attribute_type< i >::type &)> & | onmerge_function () const |
Return the current dynamic onmerge function associated with i-attributes, when *this is const. More... | |
Boolean Marks | |
size_type | get_new_mark () const |
Reserves a new mark. More... | |
bool | is_reserved (size_type m) const |
Returns true iff m is a reserved mark of the generic map. More... | |
bool | is_marked (Dart_const_handle dh, size_type m) const |
Returns true iff *dh is marked for m . More... | |
void | mark (Dart_const_handle dh, size_type m) const |
Marks *dh for m . More... | |
void | unmark (Dart_const_handle dh, size_type m) const |
Unmarks *dh for the mark m . More... | |
void | negate_mark (size_type m) const |
Inverse the mark m for all the darts of the generic map. More... | |
void | unmark_all (size_type m) const |
Unmarks all the darts of the generic map for m . More... | |
size_type | number_of_marked_darts (size_type m) const |
Returns the number of marked darts for m . More... | |
size_type | number_of_unmarked_darts (size_type m) const |
Return the number of unmarked darts for m . More... | |
void | free_mark (size_type m) const |
Frees mark m . More... | |
Constructions | |
Dart_handle | make_combinatorial_hexahedron () |
Creates a combinatorial hexahedron (six combinatorial quadrangles 2-sewn together), and adds it in the generic map. More... | |
Dart_handle | make_combinatorial_polygon (unsigned int lg) |
Creates a combinatorial polygon of length lg (a cycle of lg darts 1-sewn together), and adds it in the generic map. More... | |
Dart_handle | make_combinatorial_tetrahedron () |
Creates a combinatorial tetrahedron (four combinatorial triangles 2-sewn together), and adds it in the generic map. More... | |
Dart_handle | make_edge () |
Creates an isolated edge (two darts sewn to represent one edge and two vertices) and adds it in the generic map. More... | |
Operations | |
Dart_handle | insert_cell_0_in_cell_1 (Dart_handle dh) |
Inserts a 0-cell in the 1-cell containing dh . More... | |
Dart_handle | insert_cell_0_in_cell_2 (Dart_handle dh) |
Inserts a 0-cell in the 2-cell containing dh . More... | |
Dart_handle | insert_cell_1_in_cell_2 (Dart_handle dh1, Dart_handle dh2) |
Inserts a 1-cell in the 2-cell containing dh1 and dh2 . More... | |
template<class InputIterator > | |
Dart_handle | 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) . More... | |
Dart_handle | insert_dangling_cell_1_in_cell_2 (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... | |
bool | is_insertable_cell_1_in_cell_2 (Dart_const_handle dh1, Dart_const_handle dh2) |
Returns true iff it is possible to insert a 1-cell in the generic map between dh1 and dh2 . More... | |
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) . More... | |
template<unsigned int i> | |
bool | is_removable (Dart_const_handle dh) |
Returns true iff the i-cell containing dh can be removed. More... | |
template<unsigned int i> | |
size_type | remove_cell (Dart_handle dh) |
Removes the i-cell containing dh . More... | |
using GenericMap::Attribute_const_handle = unspecified_type |
Attribute_handle<i>::type
is a const handle to i-attributes.
For each Attribute_const_handle<i>::type ah
, the type of *ah
must be const Attribute_type<i>::type
.
dimension
and i-attributes are non void. 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
.
dimension
and i-attributes are non void. using GenericMap::Attribute_handle = unspecified_type |
Attribute_handle<i>::type
is a handle to i-attributes.
For each Attribute_handle<i>::type ah
, the type of *ah
must be Attribute_type<i>::type
.
dimension
and i-attributes are non void. 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
.
dimension
and i-attributes are non void. 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_handle
is equal to Dart_handle
, and Attribute_type<i>::type::Dart_const_handle
is equal to Dart_const_handle
.
dimension
and i-attributes are non void
. 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 handle type.
For each Dart_const_handle dh
, the type of *dh
must be const Dart
.
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 handle type.
For each Dart_handle dh
, the type of *dh
must be Dart
.
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
.
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
.
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
.
using GenericMap::Dart_of_orbit_range = unspecified_type |
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
.
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
.
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
.
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
.
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.
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_handle<i>::type GenericMap::attribute | ( | Dart_handle | dh | ) |
Returns a handle to the i-attribute associated to dart *dh
.
dimension
, and i-attributes are non void
. Attribute_const_handle<i>::type GenericMap::attribute | ( | Dart_const_handle | dh | ) | const |
Returns a const handle to the i-attribute associated to dart *dh
, when the dart is const.
dimension
, and i-attributes are non void
. Attribute_range<i>::type& GenericMap::attributes | ( | ) |
Returns a range of all the i-attributes in the generic map.
dimension
, and i-attributes are non void. Attribute_const_range<i>::type& GenericMap::attributes | ( | ) | const |
Returns a const range of all the i-attributes in the generic map.
dimension
, and i-attributes are non void. 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()
:
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
;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);dart_of_attribute(d)
\( \in \) i-cell(d
). Attribute_handle<i>::type GenericMap::create_attribute | ( | T1 | t1 | ) |
Creates a new i-attribute in the generic map, and returns the corresponding handle.
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.
dimension
, and i-attributes are non void. Dart_handle GenericMap::create_dart | ( | T1 | t1 | ) |
Creates a new dart in the generic map, and returns the corresponding handle.
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_handle& GenericMap::dart | ( | Dart_handle | adart | ) |
A shorcut for dart_of_attribute<i>
(
attribute<i>
(adart))
.
attribute<i>(adart)!=nullptr
. Dart_const_handle GenericMap::dart | ( | Dart_const_handle | adart | ) | const |
A shorcut for dart_of_attribute<i>
(
attribute<i>
(adart))
for const handle.
attribute<i>(adart)!=nullptr
. Dart_handle GenericMap::dart_handle | ( | Dart & | d | ) |
Returns the dart handle of d
.
d
\( \in \) darts()
. Dart_const_handle GenericMap::dart_handle | ( | const Dart & | d | ) | const |
Returns the dart const handle of d
.
d
\( \in \) darts()
. Dart_handle GenericMap::dart_of_attribute | ( | typename Attribute_handle< 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
.
dimension
, i-attributes are non void
and ah
!=nullptr. Dart_const_handle GenericMap::dart_of_attribute | ( | typename Attribute_const_handle< 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
.
dimension
, i-attributes are non void
and ah
!=nullptr. Dart_of_cell_range GenericMap::darts_of_cell | ( | Dart_handle | dh | ) |
Returns a range of all the darts of the i-cell containing *dh
.
The first element in the range points onto *dh
. i-cells are considered in dim dimension. If i==dim+1, range of all the darts of the connected component containing dh
.
Dart_of_cell_const_range GenericMap::darts_of_cell | ( | Dart_const_handle | dh | ) | const |
Returns a const range of all the darts of the i-cell containing *dh
.
The first element in the range points onto *dh
. i-cells are considered in dim dimension. If i==dim+1, const range of all the darts of the connected component containing *dh
.
Dart_of_orbit_range GenericMap::darts_of_orbit | ( | Dart_handle | dh | ) |
Returns a range of all the darts of the orbit <I...>(*dh)
.
The first element in the range points onto *dh
.
Dart_of_orbit_const_range GenericMap::darts_of_orbit | ( | Dart_const_handle | dh | ) | const |
Returns a const range of all the darts of the orbit <I...>(*dh)
.
The first element in the range points onto *dh
.
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
void GenericMap::erase_attribute | ( | Attribute_handle< i >::type | ah | ) |
Removes the i-attribute *ah
from the generic map.
dimension
, i-attributes are non void, and *ah
\( \in \) attributes<i>()
. void GenericMap::erase_dart | ( | Dart_handle | dh | ) |
Removes *dh
from the generic map.
*dh
\( \in \) darts()
. void GenericMap::free_mark | ( | size_type | m | ) | const |
Frees mark m
.
is_reserved(m)
. 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.
int GenericMap::highest_nonfree_dimension | ( | Dart_const_handle | dh | ) | const |
Returns the highest dimension i such that dart *dh
is not i-free.
-1 if dh
is free for any dimension.
Dart_info& GenericMap::info | ( | Dart_handle | dh | ) |
Returns the information associated to dart *dh
.
Dart_info
is not void
. const Dart_info& GenericMap::info | ( | Dart_const_handle | dh | ) | const |
Returns the information associated to dart *dh
, when the dart is const.
Dart_info
is not void
. Attribute_type<i>::type::Info& GenericMap::info | ( | Dart_handle | adart | ) |
A shorcut for info_of_attribute<i>
(
attribute<i>
(adart))
.
attribute<i>
(adart)!=nullptr
. const Attribute_type<i>::type::Info& GenericMap::info | ( | Dart_const_handle | adart | ) | const |
A shorcut for info_of_attribute<i>
(
attribute<i>
(adart))
for const handle.
attribute<i>
(adart)!=nullptr
. Attribute_type<i>::type::Info& GenericMap::info_of_attribute | ( | typename Attribute_handle< i >::type | ah | ) |
const Attribute_type<i>::type::Info& GenericMap::info_of_attribute | ( | typename Attribute_const_handle< i >::type | ah | ) | const |
Dart_handle GenericMap::insert_cell_0_in_cell_1 | ( | Dart_handle | dh | ) |
Inserts a 0-cell in the 1-cell containing dh
.
Returns next(dh)
, a handle on one dart belonging to the new 0-cell.
See examples for combinatorial map in Figure 28.11 and for generalized map in Figure 29.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 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'.
If are_attributes_automatically_managed()
==false
, non void attributes are not updated; thus the generic map can be no more valid after this operation.
Dart_handle GenericMap::insert_cell_0_in_cell_2 | ( | 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.
See examples for combinatorial map in Figure 28.12 and for generalized map in Figure 29.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 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'.
If are_attributes_automatically_managed()
==false
, non void attributes are not updated; thus the generic map can be no more valid after this operation.
Dart_handle GenericMap::insert_cell_1_in_cell_2 | ( | Dart_handle | dh1, |
Dart_handle | dh2 | ||
) |
Inserts a 1-cell in the 2-cell containing dh1
and dh2
.
Returns previous(dh1)
, a handle on one dart belonging to the new 1-cell.
is_insertable_cell_1_in_cell_2(dh1,dh2)
.See examples for combinatorial map in Figure 28.13 and for generalized map in Figure 29.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 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'.
If are_attributes_automatically_managed()
==false
, non void attributes are not updated; thus the generic map can be no more valid after this operation.
Dart_handle 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 handle on one dart belonging to the new 2-cell.
is_insertable_cell_2_in_cell_3(afirst,alast)
.See examples for combinatorial map in Figure 28.14 and for generalized map in Figure 29.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 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'.
If are_attributes_automatically_managed()
==false
, non void attributes are not updated; thus the generic map can be no more valid after this operation.
Dart_handle GenericMap::insert_dangling_cell_1_in_cell_2 | ( | 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 previous(dh)
, a handle on the dart belonging to the new 1-cell and to the new 0-cell.
See examples for combinatorial map in Figure 28.13 and for generalized map in Figure 29.15.
If are_attributes_automatically_managed()
==false
, non void attributes are not updated; thus the generic map can be no more valid after this operation.
bool GenericMap::is_attribute_used | ( | typename Attribute_const_handle< i >::type | ah | ) | const |
Returns true if ah points to a used i-attribute (i.e. valid).
dimension
, and i-attributes are non void
. bool GenericMap::is_free | ( | Dart_const_handle | dh, |
unsigned int | i | ||
) | const |
Returns true iff dart *dh
is i-free.
dimension
. bool GenericMap::is_free | ( | Dart_const_handle | dh | ) | const |
Returns true iff dart *dh
is i-free.
dimension
. bool GenericMap::is_insertable_cell_1_in_cell_2 | ( | Dart_const_handle | dh1, |
Dart_const_handle | dh2 | ||
) |
Returns true iff it is possible to insert a 1-cell in the generic map between dh1
and dh2
.
This is possible if dh1
\( \neq \) dh2
and dh1
can be reached from dh2
by using some previous
and next
calls.
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.
dimension
\( \geq\) 3.bool GenericMap::is_marked | ( | Dart_const_handle | dh, |
size_type | m | ||
) | const |
Returns true iff *dh
is marked for m
.
is_reserved(m)
and *dh
\( \in \) darts()
. bool GenericMap::is_removable | ( | Dart_const_handle | dh | ) |
Returns true iff the i-cell containing dh
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 dh
is incident to at most two (i+1)-cells.
remove_cell<i>
bool GenericMap::is_reserved | ( | size_type | m | ) | const |
Returns true iff m
is a reserved mark of the generic map.
NB_MARKS
. 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.
dimension
. Dart_handle GenericMap::make_combinatorial_hexahedron | ( | ) |
Creates a combinatorial hexahedron (six combinatorial quadrangles 2-sewn together), and adds it in the generic map.
Returns a handle on one dart of this combinatorial hexahedron.
dimension
\(\geq\) 2.Dart_handle GenericMap::make_combinatorial_polygon | ( | unsigned int | lg | ) |
Creates a combinatorial polygon of length lg
(a cycle of lg
darts 1-sewn together), and adds it in the generic map.
Returns a handle on one dart of this combinatorial polygon.
dimension
\( \geq\) 1 and lg
\( >\) 0.Dart_handle GenericMap::make_combinatorial_tetrahedron | ( | ) |
Creates a combinatorial tetrahedron (four combinatorial triangles 2-sewn together), and adds it in the generic map.
Returns a handle on one dart of this combinatorial tetrahedron.
dimension
\( \geq\) 2.Dart_handle 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 handle on one dart of this edge.
dimension
\( \geq\) 2.void GenericMap::mark | ( | Dart_const_handle | dh, |
size_type | m | ||
) | const |
Marks *dh
for m
.
is_reserved(m)
and *dh
\( \in \) darts()
. 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.
is_reserved(m)
. size_type GenericMap::number_of_attributes | ( | ) | const |
Returns the number of i-attributes in the generic map.
dimension
, and i-attributes are non void. Returns the number of marked darts for m
.
is_reserved(m)
. Return the number of unmarked darts for m
.
is_reserved(m)
. 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.
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.
One_dart_per_incident_cell_range GenericMap::one_dart_per_incident_cell | ( | Dart_handle | dh | ) |
Returns a range of one dart of each i-cell incident to the j-cell containing *dh
.
The first element in the range points onto *dh
. 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 *dh
instead of the j-cell.
One_dart_per_incident_cell_const_range GenericMap::one_dart_per_incident_cell | ( | Dart_const_handle | dh | ) | const |
Returns a const range of one dart of each i-cell incident to the j-cell containing *dh
.
The first element in the range points onto *dh
. 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 *dh
instead of the j-cell.
boost::function<void(typename Attribute_type< i >::type&, typename Attribute_type< i >::type&)>& GenericMap::onmerge_function | ( | ) |
Return the current dynamic onmerge function associated with i-attributes.
This is a boost:function returning void and having two references to Attribute_type<i>::type
as parameters. The onmerge function is returned by reference so that we can modify it.
const boost::function<void(typename Attribute_type< i >::type&, typename Attribute_type< i >::type&)>& GenericMap::onmerge_function | ( | ) | const |
Return the current dynamic onmerge 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.
boost::function<void(typename Attribute_type< i >::type&, typename Attribute_type< i >::type&)>& GenericMap::onsplit_function | ( | ) |
Return the current dynamic onsplit function associated with i-attributes.
This is a boost:function returning void and having two references to Attribute_type<i>::type
as parameters. The onsplit function is returned by reference so that we can modify it.
const boost::function<void(typename Attribute_type< i >::type&, typename Attribute_type< i >::type&)>& GenericMap::onsplit_function | ( | ) | const |
Return the current dynamic onsplit 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.
GenericMap& GenericMap::operator= | ( | const GenericMap & | bmap | ) |
Assignment operator.
All darts and attributes are duplicated, and the former generic map is deleted.
Dart_handle GenericMap::opposite | ( | Dart_handle | dh | ) |
Returns a handle to a dart belonging to the opposite i-cell than *dh
.
This dart does not belong to the same 0-cell than *dh
, nor to the same i-cell, but belongs to the same i-cell than *dh
for each j, 2 \( \leq \) j \( \leq \) dimension
, j \( \neq \) i.
dimension
. Dart_const_handle GenericMap::opposite | ( | Dart_const_handle | dh | ) | const |
Returns a const handle to a dart belonging to the opposite i-cell than *dh
.
This dart does not belong to the same 0-cell than *dh
, nor to the same i-cell, but belongs to the same i-cell than *dh
for each j, 2 \( \leq \) j \( \leq \) dimension
, j \( \neq \) i.
dimension
. Dart_handle GenericMap::other_extremity | ( | Dart_handle | dh | ) |
Returns a handle to a dart belonging to the other vertex of the edge containing dart *dh
(but not necessarily to the same edge).
nullptr
if such a dart does not exist.
Dart_const_handle GenericMap::other_extremity | ( | Dart_const_handle | dh | ) | const |
Returns a const handle to a dart belonging to the other vertex of the edge containing dart *dh
, when the dart is const (but not necessarily to the same edge).
nullptr
if such a dart does not exist.
size_type GenericMap::remove_cell | ( | Dart_handle | dh | ) |
Removes the i-cell containing dh
.
Returns the number of darts removed from the generic map.
is_removable<i>(dh)
.See examples in Figure 28.11, Figure 28.13 and Figure 28.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 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'.
If are_attributes_automatically_managed()
==false
, non void attributes are not updated; thus the generic map can be no more valid after this operation.
void GenericMap::set_attribute | ( | Dart_handle | dh, |
Attribute_handle< i >::type | ah | ||
) |
Associates the i-attribute of all the darts of the i-cell containing *dh
to *ah
.
*dh
\( \in \) darts()
, 0 \( \leq \) i \( \leq \) dimension
, i-attributes are non void, and *ah
\( \in \) attributes<i>()
. void GenericMap::set_automatic_attributes_management | ( | bool | update_attributes | ) |
Set the status of the managment of the attributes of the generic map.
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.
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.
void GenericMap::unmark | ( | Dart_const_handle | dh, |
size_type | m | ||
) | const |
Unmarks *dh
for the mark m
.
is_reserved(m)
and *dh
\( \in \) darts()
. void GenericMap::unmark_all | ( | size_type | m | ) | const |
Unmarks all the darts of the generic map for m
.
is_reserved(m)
.