CGAL 4.10-I-196 - Generalized Maps
|
The concept GeneralizedMap
defines a d-dimensional generalized map.
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_handle | alpha (Dart_handle dh, int i, int j) |
Returns \( \alpha_j\)( \( \alpha_i\)(*dh )). More... | |
Dart_const_handle | alpha (Dart_const_handle dh, int i, int j) const |
Returns \( \alpha_j\)( \( \alpha_i\)(*dh )). More... | |
template<int i, int j> | |
Dart_handle | alpha (Dart_handle dh) |
Returns \( \alpha_j\)( \( \alpha_i\)(*dh )). More... | |
template<int i, int j> | |
Dart_const_handle | alpha (Dart_const_handle dh) const |
Returns \( \alpha_j\)( \( \alpha_i\)(*dh )). More... | |
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. More... | |
Modifiers | |
template<unsigned int i> | |
void | link_alpha (Dart_handle dh1, Dart_handle dh2) |
Links *dh1 and *dh2 by \( \alpha_i\). More... | |
template<unsigned int i> | |
void | unlink_alpha (Dart_handle dh) |
Unlinks *dh and \( \alpha_i\)(*dh ) by \( \alpha_i\). More... | |
Operations | |
template<unsigned int i> | |
bool | is_sewable (Dart_const_handle dh1, Dart_const_handle dh2) const |
Returns true iff *dh1 can be i-sewn with *dh2 by keeping the generic map valid. More... | |
template<unsigned int i> | |
void | sew (Dart_handle dh1, Dart_handle dh2) |
i-sew darts *dh1 and *dh2 , by keeping the generic map valid. More... | |
template<unsigned int i> | |
void | unsew (Dart_handle dh) |
i-unsew darts *dh and *opposite<i>(*dh) , by keeping the generic map valid. More... | |
Dart_handle GeneralizedMap::alpha | ( | Dart_handle | dh, |
int | i, | ||
int | j | ||
) |
Returns \( \alpha_j\)( \( \alpha_i\)(*dh
)).
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(dh,1)
= \( \alpha_1\)(*dh
), and alpha(dh,1,2,3,0)
= \( \alpha_0\)( \( \alpha_3\)( \( \alpha_2\)( \( \alpha_1\)(*dh
)))).
Dart_const_handle GeneralizedMap::alpha | ( | Dart_const_handle | dh, |
int | i, | ||
int | j | ||
) | const |
Dart_handle GeneralizedMap::alpha | ( | Dart_handle | dh) |
Returns \( \alpha_j\)( \( \alpha_i\)(*dh
)).
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>(dh)
= \( \alpha_1\)(*dh
), and alpha<1,2,3,0>(dh)
= \( \alpha_0\)( \( \alpha_3\)( \( \alpha_2\)( \( \alpha_1\)(*dh
)))).
Dart_const_handle GeneralizedMap::alpha | ( | Dart_const_handle | dh) | const |
bool GeneralizedMap::is_sewable | ( | Dart_const_handle | dh1, |
Dart_const_handle | dh2 | ||
) | const |
Returns true iff *dh1
can be i-sewn with *dh2
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{}\)(*dh1) and D2= \( \langle{}\) \( \alpha_0\), \( \ldots\), \( \alpha_{i-2}\), \( \alpha_{i+2}\), \( \ldots\), \( \alpha_d\) \( \rangle{}\)(*dh2) satisfying:
dimension
, *dh1
\( \in \) darts()
, and *dh2
\( \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_handle | dh1, |
Dart_handle | dh2 | ||
) |
Links *dh1
and *dh2
by \( \alpha_i\).
The generalized map can be no longer valid after this operation. If are_attributes_automatically_managed()
==true
, non void attributes of *dh1
and *dh2
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 *dh1
is associated to *dh2
.
void GeneralizedMap::sew | ( | Dart_handle | dh1, |
Dart_handle | dh2 | ||
) |
i-sew darts *dh1
and *dh2
, 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{}\)(*dh1
) and D2= \( \langle{}\) \( \alpha_0\), \( \alpha_2\), \( \ldots\), \( \alpha_{i-2}\), \( \alpha_{i+2}\), \( \ldots\), \( \alpha_d\) \( \rangle{}\)(*dh2
) such that d2=f(d1), where f is the bijection between D1 and D2 satisfying: f(*dh1)=*dh2, 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 and the other not, the non NULL attribute is associated to all the darts of the resulting cell. When the two attributes are non NULL, 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>(dh1,dh2)
.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_handle | dh) |
void GeneralizedMap::unsew | ( | Dart_handle | dh) |
i-unsew darts *dh
and *opposite<i>(*dh)
, 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{}\)(*dh
).
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
, *dh
\( \in \) darts()
and *dh
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.