CGAL - Generalized Maps
|
The concept GeneralizedMap
defines a d-dimensional generalized map.
GenericMap
CGAL::Generalized_map<d,Items,Alloc>
For a generalized map, the function next
is equal to \( \alpha_1\circ\alpha_0\), previous
is equal to \( \alpha_0\circ\alpha_1\) and the function opposite<i>
is equal to \( \alpha_i\circ\alpha_0\).
Access Member Functions | |
Dart_descriptor | alpha (Dart_descriptor d, int i, int j) |
Returns \( \alpha_j\)( \( \alpha_i\)(d )). | |
Dart_const_descriptor | alpha (Dart_const_descriptor d, int i, int j) const |
Returns \( \alpha_j\)( \( \alpha_i\)(d )). | |
template<int i, int j> | |
Dart_descriptor | alpha (Dart_descriptor d) |
Returns \( \alpha_j\)( \( \alpha_i\)(d )). | |
template<int i, int j> | |
Dart_const_descriptor | alpha (Dart_const_descriptor d) const |
Returns \( \alpha_j\)( \( \alpha_i\)(d )). | |
bool | is_orientable () const |
Returns true iff the current generalized map is orientable. | |
bool | is_valid () const |
Returns true iff the generalized map is valid. | |
Modifiers | |
template<unsigned int i> | |
void | link_alpha (Dart_descriptor d1, Dart_descriptor d2) |
Links d1 and d2 by \( \alpha_i\). | |
template<unsigned int i> | |
void | unlink_alpha (Dart_descriptor d) |
Unlinks d and \( \alpha_i\)(d ) by \( \alpha_i\). | |
Operations | |
template<unsigned int i> | |
bool | is_sewable (Dart_const_descriptor d1, Dart_const_descriptor d2) const |
Returns true iff d1 can be i-sewn with d2 by keeping the generic map valid. | |
template<unsigned int i> | |
void | sew (Dart_descriptor d1, Dart_descriptor d2) |
i-sew darts d1 and d2 , by keeping the generic map valid. | |
template<unsigned int i> | |
void | unsew (Dart_descriptor d) |
i-unsew darts d and opposite<i>(d) , by keeping the generic map valid. | |
Dart_const_descriptor GeneralizedMap::alpha | ( | Dart_const_descriptor | d | ) | const |
Dart_const_descriptor GeneralizedMap::alpha | ( | Dart_const_descriptor | d, |
int | i, | ||
int | j | ||
) | const |
Dart_descriptor GeneralizedMap::alpha | ( | Dart_descriptor | d | ) |
Returns \( \alpha_j\)( \( \alpha_i\)(d
)).
Overloads of this member function are defined that take from one to nine integer as template arguments. For each function, alphas are applied in the same order as their indices are given as template arguments.
For example alpha<1>(d)
= \( \alpha_1\)(d
), and alpha<1,2,3,0>(d)
= \( \alpha_0\)( \( \alpha_3\)( \( \alpha_2\)( \( \alpha_1\)(d
)))).
Dart_descriptor GeneralizedMap::alpha | ( | Dart_descriptor | d, |
int | i, | ||
int | j | ||
) |
Returns \( \alpha_j\)( \( \alpha_i\)(d
)).
Overloads of this member function are defined that take from one to nine integer as arguments. For each function, alphas are applied in the same order as their indices are given as parameters.
For example alpha(d,1)
= \( \alpha_1\)(d
), and alpha(d,1,2,3,0)
= \( \alpha_0\)( \( \alpha_3\)( \( \alpha_2\)( \( \alpha_1\)(d
)))).
bool GeneralizedMap::is_sewable | ( | Dart_const_descriptor | d1, |
Dart_const_descriptor | d2 | ||
) | const |
Returns true iff d1
can be i-sewn with d2
by keeping the generic map valid.
This is true if there is a bijection f between all the darts of the orbit D1= \( \langle{}\) \( \alpha_0\), \( \ldots\), \( \alpha_{i-2}\), \( \alpha_{i+2}\), \( \ldots\), \( \alpha_d\) \( \rangle{}\)(d1) and D2= \( \langle{}\) \( \alpha_0\), \( \ldots\), \( \alpha_{i-2}\), \( \alpha_{i+2}\), \( \ldots\), \( \alpha_d\) \( \rangle{}\)(d2) satisfying:
dimension
, d1
\( \in \) darts()
, and d2
\( \in \) darts()
. bool GeneralizedMap::is_valid | ( | ) | const |
Returns true iff the generalized map is valid.
A generalized map is valid (see Sections Mathematical Definitions and Generalized Map Properties) if for all its darts d
\(\in\) darts()
:
dimension
: \( \alpha_i(\alpha_i(d))=d\);dimension
-2 and i+2 \( \leq \) j \( \leq \) dimension
: \( \alpha_j(\alpha_i(\alpha_j(\alpha_i(d))))=d\);dimension
such that i-attributes are non void:void GeneralizedMap::link_alpha | ( | Dart_descriptor | d1, |
Dart_descriptor | d2 | ||
) |
Links d1
and d2
by \( \alpha_i\).
The generalized map can be no longer valid after this operation. If are_attributes_automatically_managed()
==true
, non void attributes of d1
and d2
are updated: if one dart has an attribute and the second dart not, the non null attribute is associated to the dart having a null attribute. If both darts have an attribute, the attribute of d1
is associated to d2
.
void GeneralizedMap::sew | ( | Dart_descriptor | d1, |
Dart_descriptor | d2 | ||
) |
i-sew darts d1
and d2
, by keeping the generic map valid.
Links by \( \alpha_i\) two by two all the darts of the orbit D1= \( \langle{}\) \( \alpha_0\), \( \ldots\), \( \alpha_{i-2}\), \( \alpha_{i+2}\), \( \ldots\), \( \alpha_d\) \( \rangle{}\)(d1
) and D2= \( \langle{}\) \( \alpha_0\), \( \alpha_2\), \( \ldots\), \( \alpha_{i-2}\), \( \alpha_{i+2}\), \( \ldots\), \( \alpha_d\) \( \rangle{}\)(d2
) such that d2=f(d1), where f is the bijection between D1 and D2 satisfying: f(d1)=d2, and for all e \( \in\) D1, for all j \( \in\) {1, \( \ldots\),i-2,i+2, \( \ldots\),d}, f( \( \alpha_j\)(e))= \( \alpha_j\)(f(e)).
If are_attributes_automatically_managed()
==true
, when necessary, non void attributes are updated to ensure the validity of the generic map: for each j-cells c1 and c2 which are merged into one j-cell during the sew, the two associated attributes attr1 and attr2 are considered. If one attribute is null_descriptor
and the other not, the non null_descriptor
attribute is associated to all the darts of the resulting cell. When the two attributes are non null_descriptor
, functor Attribute_type<i>::type::On_merge
is called on the two attributes attr1 and attr2. If set, the dynamic onmerge function of i-attributes is also called on attr1 and attr2. Then, the attribute attr1 is associated to all darts of the resulting j-cell. Finally, attribute attr2 is removed from the generic map.
is_sewable<i>(d1,d2)
.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 GeneralizedMap::unlink_alpha | ( | Dart_descriptor | d | ) |
void GeneralizedMap::unsew | ( | Dart_descriptor | d | ) |
i-unsew darts d
and opposite<i>(d)
, by keeping the generic map valid.
Unlinks by \( \alpha_i\) all the darts in the orbit \( \langle{}\) \( \alpha_0\), \( \ldots\), \( \alpha_{i-2}\), \( \alpha_{i+2}\), \( \ldots\), \( \alpha_d\) \( \rangle{}\)(d
).
If are_attributes_automatically_managed()
==true
, when necessary, non void attributes are updated to ensure the validity of the generic map: for each j-cell c split in two j-cells c1 and c2 by the operation, if c is associated to a j-attribute attr1, then this attribute is duplicated into attr2, and all the darts belonging to c2 are associated with this new attribute. Finally, the functor Attribute_type<i>::type::On_split
is called on the two attributes attr1 and attr2. If set, the dynamic onsplit function of i-attributes is also called on attr1 and attr2.
dimension
, d
\( \in \) darts()
and d
is not i-free.If are_attributes_automatically_managed()
==false
, non void attributes are not updated thus the generic map can be no more valid after this operation.