CGAL 4.10-I-196 - Generalized Maps
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
GeneralizedMap Concept Reference

Definition

The concept GeneralizedMap defines a d-dimensional generalized map.

Refines:
GenericMap
Has Models:
CGAL::Generalized_map<d,Items,Alloc>

For a generalized map, the function next is equal to α1α0, previous is equal to α0α1 and the function opposite<i> is equal to αiα0.

Access Member Functions

Dart_handle alpha (Dart_handle dh, int i, int j)
 Returns αj( αi(*dh)). More...
 
Dart_const_handle alpha (Dart_const_handle dh, int i, int j) const
 Returns αj( αi(*dh)). More...
 
template<int i, int j>
Dart_handle alpha (Dart_handle dh)
 Returns αj( αi(*dh)). More...
 
template<int i, int j>
Dart_const_handle alpha (Dart_const_handle dh) const
 Returns αj( α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 αi. More...
 
template<unsigned int i>
void unlink_alpha (Dart_handle dh)
 Unlinks *dh and αi(*dh) by α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...
 

Member Function Documentation

Dart_handle GeneralizedMap::alpha ( Dart_handle  dh,
int  i,
int  j 
)

Returns αj( α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)= α1(*dh), and alpha(dh,1,2,3,0)= α0( α3( α2( α1(*dh)))).

Precondition
0 i dimension, 0 j dimension and *dh darts().
Dart_const_handle GeneralizedMap::alpha ( Dart_const_handle  dh,
int  i,
int  j 
) const

Returns αj( αi(*dh)).

Overloads of this member function are defined that take from one to nine integer as arguments.

Precondition
0 i dimension, 0 j dimension and *dh darts().
template<int i, int j>
Dart_handle GeneralizedMap::alpha ( Dart_handle  dh)

Returns αj( α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)= α1(*dh), and alpha<1,2,3,0>(dh)= α0( α3( α2( α1(*dh)))).

Precondition
0 i dimension, 0 j dimension and *dh darts().
template<int i, int j>
Dart_const_handle GeneralizedMap::alpha ( Dart_const_handle  dh) const

Returns αj( αi(*dh)).

Overloads of this member function are defined that take from one to nine integer as template arguments.

Precondition
0 i dimension, 0 j dimension and *dh darts().
template<unsigned int i>
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= α0, , αi2, αi+2, , αd (*dh1) and D2= α0, , αi2, αi+2, , αd (*dh2) satisfying:

  • f(*dh1)=*dh2,
  • e D1, j {1, ,i-2,i+2, ,d}, f( αj(e))= αj(f(e)).
Precondition
0 i dimension, *dh1 darts(), and *dh2 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 darts():

  • i, 0 i dimension: αi(αi(d))=d;
  • i, j such that 0 i dimension-2 and i+2 j dimension: αj(αi(αj(αi(d))))=d;
  • i, 0 i dimension such that i-attributes are non void:
    • d2 in the same i-cell than d: d and d2 have the same i-attribute;
    • d2 in a different i-cell than d: d and d2 have different i-attributes.
template<unsigned int i>
void GeneralizedMap::link_alpha ( Dart_handle  dh1,
Dart_handle  dh2 
)

Links *dh1 and *dh2 by α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.

Precondition
0 i dimension, *dh1 darts(), *dh2 darts() and (i < 2 or dh1 dh2).
template<unsigned int i>
void GeneralizedMap::sew ( Dart_handle  dh1,
Dart_handle  dh2 
)

i-sew darts *dh1 and *dh2, by keeping the generic map valid.

Links by αi two by two all the darts of the orbit D1= α0, , αi2, αi+2, , αd (*dh1) and D2= α0, α2, , αi2, αi+2, , αd (*dh2) such that d2=f(d1), where f is the bijection between D1 and D2 satisfying: f(*dh1)=*dh2, and for all e D1, for all j {1, ,i-2,i+2, ,d}, f( αj(e))= α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.

Precondition
is_sewable<i>(dh1,dh2).
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.

template<unsigned int i>
void GeneralizedMap::unlink_alpha ( Dart_handle  dh)

Unlinks *dh and αi(*dh) by αi.

The generalized map can be no longer valid after this operation. Attributes of *dh and αi(*dh) are not modified.

Precondition
0 i dimension, *dh darts(), and *dh is not i-free.
template<unsigned int i>
void GeneralizedMap::unsew ( Dart_handle  dh)

i-unsew darts *dh and *opposite<i>(*dh), by keeping the generic map valid.

Unlinks by αi all the darts in the orbit α0, , αi2, αi+2, , αd (*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.

Precondition
0 i dimension, *dh darts() and *dh is not i-free.
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.