diff --git a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt index 66f3db12aa1..0dedfe1d2a5 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt +++ b/Combinatorial_map/doc/Combinatorial_map/Combinatorial_map.txt @@ -6,6 +6,7 @@ namespace CGAL { \anchor ChapterCombinatorialMap \author Guillaume Damiand +\autotoc # Introduction # {#Combinatorial_mapIntroduction} @@ -15,10 +16,10 @@ obtained by taking dD cells, and allowing to glue dD cells along (d-1)D cells. It provides a description of all the cells of the subdivision (for example vertices and edges), together with incidence and adjacency relationships. This package is a -generalization of the halfedge data structure to higher -dimension. Indeed, a 2D combinatorial map is equivalent to a halfedge -data structure: there is a one-to-one mapping between elements of both -data structures, halfedges corresponding to darts. +generalization of the \ref chapterHalfedgeDS "halfedge data structure" +to higher dimension. Indeed, a 2D combinatorial map is equivalent to a +halfedge data structure: there is a one-to-one mapping between elements +of both data structures, halfedges corresponding to darts. We denote i-cell for an i-dimensional cell (for example in 3D, 0-cells are vertices, 1-cells are edges, 2-cells diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h index 7cfecf3db98..406874bd6ad 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h +++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h @@ -61,8 +61,8 @@ static size_type NB_MARKS; /*! The null dart handle constant. -A dart `d0` is i-free if `d0.beta(i)==null_dart_handle`. -Note that `*null_dart_handle`\f$ \notin\f$`cm.darts()`. +A dart `d` is i-free if `beta(d, i)==null_dart_handle`. +Note that `*null_dart_handle`\f$ \notin\f$`darts()`. */ static Dart_handle null_dart_handle; @@ -73,7 +73,7 @@ static Dart_handle null_dart_handle; /*! The tuple of cell attributes. -It contains at most dimension+1 types +It contains at most \ref CombinatorialMap::dimension "dimension"`+1` types (one for each possible cell of the combinatorial 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 @@ -81,9 +81,9 @@ the tuple must be either a model of the `CellAttribute` concept or 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\f$ -<\f$dimension+1, \f$ \forall\f$i: k\f$ -\leq\f$i\f$ \leq\f$dimension, i-attributes are -disabled. +<\f$\ref CombinatorialMap::dimension "dimension"`+1`, \f$ \forall\f$i: k\f$ +\leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", +i-attributes are disabled. */ typedef Hidden_type Attributes; @@ -95,7 +95,8 @@ struct Attribute_type Type of i-attributes, a model of `CellAttribute` concept. `Attribute_type::type::Dart_handle` is equal to `Dart_handle`, and `Attribute_type::type::Dart_const_handle` is equal to `Dart_const_handle`. - \pre 0\f$ \leq\f$i\f$ \leq\f$dimension and i-attributes are non void. + \pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension" + and i-attributes are non void. */ template typedef Attribute_type::type; @@ -104,7 +105,8 @@ template struct Attribute_handle { /*! Handle to i-attributes, equal to `Dart::Attribute_handle::type`. - \pre 0\f$ \leq\f$i\f$ \leq\f$dimension and i-attributes are non void. + \pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension" + and i-attributes are non void. */ typedef Hidden_type type; }; @@ -113,7 +115,8 @@ template struct Attribute_const_handle { /*! Const handle to i-attributes, equal to `Dart::Attribute_const_handle::type`. - \pre 0\f$ \leq\f$i\f$ \leq\f$dimension and i-attributes are non void. + \pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension" + and i-attributes are non void. */ typedef Hidden_type type; }; @@ -125,13 +128,15 @@ struct Attribute_const_handle { /*! Range of all the darts of the combinatorial map. -This type is a model of `Range` concept, its iterator type is bidirectional and its value type is `Dart`. +This type is a model of `Range` concept, its iterator type is bidirectional and its value type is + \ref CombinatorialMap::Dart "Dart". */ typedef Hidden_type Dart_range; /*! Const range of all the darts of the combinatorial map. -This type is a model of `ConstRange` concept, its iterator type is bidirectional and its value type is `Dart`. +This type is a model of `ConstRange` concept, its iterator type is bidirectional and its value type is + \ref CombinatorialMap::Dart "Dart". */ typedef Hidden_type Dart_const_range; @@ -140,8 +145,11 @@ template struct Attribute_range { /*! Range of all the i-attributes. -The i-attributes must be non void, and 0\f$ \leq\f$i\f$ \leq\f$dimension. -This type is a model of `Range` concept, its iterator type is bidirectional and its value type is `Attribute_type::type`. +The i-attributes must be non void, and + 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension". +This type is a model of `Range` concept, its iterator type is bidirectional and its value type is + `Attribute_type::type`. + \todo add links when typedef are ok */ typedef Hidden_type type; }; @@ -151,22 +159,27 @@ template struct Attribute_const_range { /*! Const range of all the i-attributes. -The i-attributes must be non void, and 0\f$ \leq\f$i\f$ \leq\f$dimension. -This type is a model of `ConstRange` concept, its iterator type is bidirectional and its value type is `Attribute_type::type`. +The i-attributes must be non void, and + 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension". +This type is a model of `ConstRange` concept, its iterator type is bidirectional and its value type is + `Attribute_type::type`. + \todo add links when typedef are ok */ typedef Hidden_type type; }; /*! Range of all the darts of the `` orbit. -This type is a model of `Range` concept, its iterator type is forward and its value type is `Dart`. +This type is a model of `Range` concept, its iterator type is forward and its value type is + \ref CombinatorialMap::Dart "Dart". */ template using Dart_of_orbit_range = Hidden_type; /*! Const range of all the darts of the `` orbit. -This type is a model of `ConstRange` concept, its iterator type is forward and its value type is `Dart`. +This type is a model of `ConstRange` concept, its iterator type is forward and its value type is + \ref CombinatorialMap::Dart "Dart". */ template using Dart_of_orbit_const_range = Hidden_type; @@ -174,9 +187,10 @@ using Dart_of_orbit_const_range = Hidden_type; /*! Range of all the darts of an i-cell. Cells are considered in dim dimension, with 0\f$ \leq\f$i\f$ \leq\f$dim+1 and - 0\f$ \leq\f$dim\f$ \leq\f$dimension. If i==dim+1, + 0\f$ \leq\f$dim\f$ \leq\f$\ref CombinatorialMap::dimension "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`. +This type is a model of `Range` concept, its iterator type is forward and its value type is + \ref CombinatorialMap::Dart "Dart". */ template using Dart_of_cell_range = Hidden_type; @@ -184,9 +198,10 @@ using Dart_of_cell_range = Hidden_type; /*! Const range of all the darts of the i-cell. Cells are considered in dim dimension, with 0\f$ \leq\f$i\f$ \leq\f$dim+1 and - 0\f$ \leq\f$dim\f$ \leq\f$dimension. If i==dim+1, + 0\f$ \leq\f$dim\f$ \leq\f$\ref CombinatorialMap::dimension "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`. +This type is a model of `ConstRange` concept, its iterator type is forward and its value type is + \ref CombinatorialMap::Dart "Dart". */ template using Dart_of_cell_const_range = Hidden_type; @@ -195,10 +210,11 @@ using Dart_of_cell_const_range = Hidden_type; Range of one dart of each i-cell incident to one j-cell. Cells are considered in dim dimension, with 0\f$ \leq\f$i\f$ \leq\f$dim+1, 0\f$ \leq\f$j\f$ \leq\f$dim+1 and -0\f$ \leq\f$dim\f$ \leq\f$dimension. If i==dim+1, +0\f$ \leq\f$dim\f$ \leq\f$\ref CombinatorialMap::dimension "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`. +This type is a model of `Range` concept, its iterator type is forward and its value type is + \ref CombinatorialMap::Dart "Dart". */ template using One_dart_per_incident_cell_range = Hidden_type; @@ -207,10 +223,11 @@ using One_dart_per_incident_cell_range = Hidden_type; Const range of one dart of each i-cell incident to one j-cell. Cells are considered in dim dimension, with 0\f$ \leq\f$i\f$ \leq\f$dim+1, 0\f$ \leq\f$j\f$ \leq\f$dim+1 and -0\f$ \leq\f$dim\f$ \leq\f$dimension. If i==dim+1, +0\f$ \leq\f$dim\f$ \leq\f$\ref CombinatorialMap::dimension "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`. +This type is a model of `ConstRange` concept, its iterator type is forward and its value type is + \ref CombinatorialMap::Dart "Dart". */ template using One_dart_per_incident_cell_const_range = Hidden_type; @@ -218,9 +235,11 @@ using One_dart_per_incident_cell_const_range = Hidden_type; /*! Range of one dart of each i-cell of the combinatorial map. Cells are considered in dim dimension, -with 0\f$ \leq\f$i\f$ \leq\f$dim+1 and 0\f$ \leq\f$dim\f$ \leq\f$dimension. +with 0\f$ \leq\f$i\f$ \leq\f$dim+1 and +0\f$ \leq\f$dim\f$ \leq\f$\ref CombinatorialMap::dimension "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`. +This type is a model of `Range` concept, its iterator type is forward and its value type is + \ref CombinatorialMap::Dart "Dart". */ template using One_dart_per_cell_range = Hidden_type; @@ -228,9 +247,11 @@ using One_dart_per_cell_range = Hidden_type; /*! Const range of one dart of each i-cell of the combinatorial map. Cells are considered in dim dimension, -with 0\f$ \leq\f$i\f$ \leq\f$dim+1 and 0\f$ \leq\f$dim\f$ \leq\f$dimension. +with 0\f$ \leq\f$i\f$ \leq\f$dim+1 and +0\f$ \leq\f$dim\f$ \leq\f$\ref CombinatorialMap::dimension "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`. +This type is a model of `ConstRange` concept, its iterator type is forward and its value type is + \ref CombinatorialMap::Dart "Dart". */ template using One_dart_per_cell_const_range = Hidden_type; @@ -250,15 +271,20 @@ Returns true iff the combinatorial map is valid. A combinatorial map is valid (see Sections \ref sseccombimapanddarts and \ref sseccombimapvalidity) if for all its darts `d` -handle dh such that \f$\in\f$`cm.darts()`: +\f$\in\f$`darts()`: -- `dh->is_free(0)`, or `dh->beta(0)->beta(1)==dh`; -- `dh->is_free(1)`, or `dh->beta(1)->beta(0)==dh`; -- \f$ \forall\f$i, 2\f$ \leq\f$i\f$ \leq\f$dimension: - `dh->is_free(i)`, or `dh->beta(i)->beta(i)==dh`; -- \f$ \forall\f$i,j, 0\f$ \leq\f$i\f$ <\f$i+2\f$ \leq\f$j\f$ \leq\f$dimension such that j\f$ \geq\f$ 3: `dh->beta(i)->beta(j)==null_dart_handle` or `dh->beta(i)->beta(j)->beta(i)->beta(j)==dh`; -- \f$ \forall\f$i, 0\f$ \leq\f$i\f$ \leq\f$dimension such that i-attributes are non void: \f$ \forall\f$dh2 such that belong to the same i-cell than `dh2->attribute()==dh->attribute()`. -\todo Replace the use of dart functions by corresponding mathematical notions. +- `d` is 0-free, or \f$ \beta_1(\beta_0(d))=d\f$; +- `d` is 1-free, or \f$ \beta_0(\beta_1(d))=d\f$; +- \f$ \forall\f$i, 2\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension": + `d` is i-free, or \f$ \beta_i(\beta_i(d))=d\f$; +- \f$ \forall\f$i, j, + 0\f$ \leq\f$i\f$ <\f$i+2\f$ \leq\f$j\f$ \leq\f$\ref CombinatorialMap::dimension "dimension" + such that j\f$ \geq\f$ 3: \f$ \beta_j(\beta_i(d))=\varnothing\f$ or ; +\f$ \beta_j(\beta_i(\beta_j(\beta_i(d))))=d\f$; +- \f$ \forall\f$i, 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension" + such that i-attributes are non void: + + \f$ \forall\f$d2 in the same i-cell than d: d and d2 have the same i-attribute; + + \f$ \forall\f$d2 in a different i-cell than d: d and d2 have different i-attributes. */ bool is_valid() const; @@ -266,7 +292,7 @@ bool is_valid() const; Returns true iff the combinatorial map is without i-boundary. The map is without i-boundary if there is no `i`-free dart. -\pre 1\f$ \leq\f$i\f$ \leq\f$dimension. +\pre 1\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension". */ bool is_without_boundary(unsigned int i) const; @@ -282,63 +308,71 @@ size_type number_of_darts() const; /*! Returns the number of i-attributes in the combinatorial map. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, and i-attributes are non void. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + and i-attributes are non void. */ template size_type number_of_attributes() const; /*! -Returns the dart handle of `adart`. -\pre `adart`\f$ \in\f$`cm.darts()`. +Returns the dart handle of `d`. +\pre `d`\f$ \in\f$`darts()`. */ -Dart_handle dart_handle(Dart& adart); +Dart_handle dart_handle(Dart& d); /*! -Returns the dart const handle of `adart`. -\pre `adart`\f$ \in\f$`cm.darts()`. +Returns the dart const handle of `d`. +\pre `d`\f$ \in\f$`darts()`. */ -Dart_const_handle dart_handle(const Dart& adart) const; +Dart_const_handle dart_handle(const Dart& d) const; /*! -Returns \f$ \beta_j\f$(\f$ \beta_i\f$(`dh`)). +Returns \f$ \beta_j\f$(\f$ \beta_i\f$(`*dh`)). Overloads of this member function are defined that take from one to nine integer as arguments. For each function, betas are applied in the same order as their indices are given as parameters. -For example `beta(dh,1)`=\f$ \beta_1\f$(`dh`), -and `beta(dh,1,2,3,0)`=\f$ \beta_0\f$(\f$ \beta_3\f$(\f$ \beta_2\f$(\f$ \beta_1\f$(`dh`)))). -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, 0\f$ \leq\f$j\f$ \leq\f$dimension and `*dh`\f$ \in\f$`cm.darts()`. +For example `beta(dh,1)`=\f$ \beta_1\f$(`*dh`), +and `beta(dh,1,2,3,0)`=\f$ \beta_0\f$(\f$ \beta_3\f$(\f$ \beta_2\f$(\f$ \beta_1\f$(`*dh`)))). +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + 0\f$ \leq\f$j\f$ \leq\f$\ref CombinatorialMap::dimension "dimension" + and `*dh`\f$ \in\f$`darts()`. */ Dart_handle beta(Dart_handle dh, int i, int j) const; /*! -Returns \f$ \beta_j\f$(\f$ \beta_i\f$(`dh`)). +Returns \f$ \beta_j\f$(\f$ \beta_i\f$(`*dh`)). Overloads of this member function are defined that take from one to nine integer as arguments. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, 0\f$ \leq\f$j\f$ \leq\f$dimension and `*dh`\f$ \in\f$`cm.darts()`. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + 0\f$ \leq\f$j\f$ \leq\f$\ref CombinatorialMap::dimension "dimension" + and `*dh`\f$ \in\f$`darts()`. */ Dart_const_handle beta(Dart_const_handle dh, int i, int j) const; /*! -Returns true iff `dh1` can be i-sewn with `dh2` by keeping the combinatorial map valid. +Returns true iff `*dh1` can be i-sewn with `*dh2` by keeping the combinatorial map valid. -True if there is +This is true if there is a bijection f between all the darts of the orbit -D1=\f$ \langle{}\f$\f$ \beta_1\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$(dh1) and -D2=\f$ \langle{}\f$\f$ \beta_1\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$(dh2) -satisfying: f(dh1)=dh2, and for all e\f$ \in\f$D1, for all j\f$ \in\f${1,\f$ \ldots\f$,i-2,i+2,\f$ \ldots\f$,d}, +D1=\f$ \langle{}\f$\f$ \beta_1\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$(*dh1) and +D2=\f$ \langle{}\f$\f$ \beta_1\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$(*dh2) +satisfying: f(*dh1)=*dh2, and for all e\f$ \in\f$D1, for all j\f$ \in\f${1,\f$ \ldots\f$,i-2,i+2,\f$ \ldots\f$,d}, f(\f$ \beta_j\f$(e))=\f$ \beta_j^{-1}\f$(f(e)). -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, `*dh1`\f$ \in\f$`cm.darts()`, and `*dh2`\f$ \in\f$`cm.darts()`. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + `*dh1`\f$ \in\f$`darts()`, and `*dh2`\f$ \in\f$`darts()`. */ template bool is_sewable(Dart_const_handle dh1, Dart_const_handle dh2) const; /*! Displays on `os` the number of elements of the combinatorial map. Its number of darts, -its number of i-cells, for each i, 0\f$ \leq\f$i\f$ \leq\f$CMap::dimension, +its number of i-cells, for each i, +0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", and its number of connected components. Example of output for a 3D combinatorial map containing two disjoint -combinatorial tetrahedra: +combinatorial tetrahedra: + \#Darts=24, \#0-cells=8, \#1-cells=12, \#2-cells=8, \#3-cells=2, \#ccs=2 */ std::ostream& display_characteristics(std::ostream & os) const; @@ -360,58 +394,65 @@ Dart_const_range& darts() const; /*! Returns a range of all the i-attributes in the combinatorial map. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, and i-attributes are non void. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + and i-attributes are non void. */ template Attribute_range::type & attributes(); /*! Returns a const range of all the i-attributes in the combinatorial map. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, and i-attributes are non void. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + and i-attributes are non void. */ template Attribute_const_range::type & attributes() const; /*! -Returns a range of all the darts of the orbit `(dh)`. -\pre `*dh`\f$ \in\f$`cm.darts()` and `Beta...` is a sequence of integers \f$ i_1\f$,\f$ \ldots\f$,\f$ i_k\f$, such that 0\f$ \leq\f$\f$ i_1\f$\f$ <\f$\f$ i_2\f$\f$ <\f$\f$ \ldots\f$\f$ <\f$\f$ i_k\f$\f$ \leq\f$dimension, and (\f$ i_1\f$\f$ \neq\f$ 0 or \f$ i_2\f$\f$ \neq\f$1). +Returns a range of all the darts of the orbit `(*dh)`. +\pre `*dh`\f$ \in\f$`darts()` and `Beta...` is a sequence of integers \f$ i_1\f$,\f$ \ldots\f$,\f$ i_k\f$, + such that 0\f$ \leq\f$\f$ i_1\f$\f$ <\f$\f$ i_2\f$\f$ <\f$\f$ \ldots\f$\f$ <\f$\f$ i_k\f$\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + and (\f$ i_1\f$\f$ \neq\f$ 0 or \f$ i_2\f$\f$ \neq\f$ 1). */ template Dart_of_orbit_range darts_of_orbit(Dart_handle dh); /*! -Returns a const range of all the darts of the orbit `(dh)`. +Returns a const range of all the darts of the orbit `(*dh)`. \pre Same as for the non const version. */ template Dart_of_orbit_const_range darts_of_orbit(Dart_const_handle dh) const; /*! -Returns a range of all the darts of the i-cell containing `dh`. +Returns a range of all the darts of the i-cell containing `*dh`. i-cells are considered in dim dimension. If i==dim+1, range of all the darts of the connected component containing `dh`. -\pre `*dh`\f$ \in\f$`cm.darts()`, 0\f$ \leq\f$i\f$ \leq\f$dim+1 and 0\f$ \leq\f$dim\f$ \leq\f$dimension. +\pre `*dh`\f$ \in\f$`darts()`, 0\f$ \leq\f$i\f$ \leq\f$dim+1 and + 0\f$ \leq\f$dim\f$ \leq\f$\ref CombinatorialMap::dimension "dimension". */ template Dart_of_cell_range darts_of_cell(Dart_handle dh); /*! -Returns a const range of all the darts of the i-cell containing `dh`. +Returns a const range of all the darts of the i-cell containing `*dh`. i-cells are considered in dim dimension. If i==dim+1, -const range of all the darts of the connected component containing `dh`. +const range of all the darts of the connected component containing `*dh`. \pre Same as for the non const version. */ template Dart_of_cell_const_range darts_of_cell(Dart_const_handle dh) const; /*! -Returns a range of one dart of each i-cell incident to the j-cell containing `dh`. +Returns a range of one dart of each i-cell incident to the j-cell containing `*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. -\pre `*dh`\f$ \in\f$`cm.darts()`, 0\f$ \leq\f$i\f$ \leq\f$dim+1, 0\f$ \leq\f$j\f$ \leq\f$dim+1 and 0\f$ \leq\f$dim\f$ \leq\f$dimension. +consider the connected component containing `*dh` instead of the j-cell. +\pre `*dh`\f$ \in\f$`darts()`, 0\f$ \leq\f$i\f$ \leq\f$dim+1, + 0\f$ \leq\f$j\f$ \leq\f$dim+1 and + 0\f$ \leq\f$dim\f$ \leq\f$\ref CombinatorialMap::dimension "dimension". */ template One_dart_per_incident_cell_range one_dart_per_incident_cell(Dart_handle dh); /*! -Returns a const range of one dart of each i-cell incident to the j-cell containing `dh`. +Returns a const range of one dart of each i-cell incident to the j-cell containing `*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. +consider the connected component containing `*dh` instead of the j-cell. \pre Same as for the non const version. */ template One_dart_per_incident_cell_const_range one_dart_per_incident_cell(Dart_const_handle dh) const; @@ -420,7 +461,8 @@ template One_dart_per_ Returns a range of one dart of each i-cell in the combinatorial map. Cells are considered in dim dimension. If i==dim+1, range of one dart of each connected component in the combinatorial map. -\pre 0\f$ \leq\f$i\f$ \leq\f$dim+1 and 0\f$ \leq\f$dim\f$ \leq\f$dimension. +\pre 0\f$ \leq\f$i\f$ \leq\f$dim+1 and + 0\f$ \leq\f$dim\f$ \leq\f$\ref CombinatorialMap::dimension "dimension". */ template One_dart_per_cell_range one_dart_per_cell(); @@ -441,8 +483,8 @@ template One_dart_per_cell_const_rang Creates a new dart in the combinatorial map, and returns the corresponding handle. Calls the constructor of dart having `T1` as parameter. A new dart is initialized to be i-free, -\f$ \forall\f$i: 0\f$ \leq\f$i\f$ \leq\f$dimension, and to have no associated -attribute for each non void attribute. +\f$ \forall\f$i: 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "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. @@ -452,7 +494,7 @@ Dart_handle create_dart(T1 t1); /*! Removes `*dh` from the combinatorial map. -\pre `*dh`\f$ \in\f$`cm.darts()`. +\pre `*dh`\f$ \in\f$`darts()`. */ void erase_dart(Dart_handle dh); @@ -462,20 +504,23 @@ Creates a new i-attribute in the combinatorial map, and returns the corre 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()` creates a new i-attribute by using the default constructor. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, and i-attributes are non void. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + and i-attributes are non void. */ template Attribute_handle::type create_attribute(T1 t1); /*! Removes the i-attribute `*ah` from the combinatorial map. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, i-attributes are non void, and `*ah`\f$ \in\f$`cm.attributes()`. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", +i-attributes are non void, and +`*ah`\f$ \in\f$\ref CombinatorialMap::attributes() "attributes()". */ template void erase_attribute(Attribute_handle::type ah); /*! -Associates the i-attribute of all the darts of the i-cell containing `dh` to `ah`. -\pre `*dh`\f$ \in\f$`cm.darts()`, 0\f$ \leq\f$i\f$ \leq\f$dimension, -i-attributes are non void, and `*ah`\f$ \in\f$`cm.attributes()`. +Associates the i-attribute of all the darts of the i-cell containing `*dh` to `*ah`. +\pre `*dh`\f$ \in\f$`darts()`, 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", +i-attributes are non void, and `*ah`\f$ \in\f$\ref CombinatorialMap::attributes() "attributes()". */ template void set_attribute(Dart_handle dh, Attribute_handle::type ah); @@ -489,13 +534,15 @@ void clear(); /// \name Operations /// @{ /*! - i-sew darts `dh1` and `dh2`, by keeping the combinatorial map valid. + i-sew darts `*dh1` and `*dh2`, by keeping the combinatorial map valid. Links by \f$ \beta_i\f$ two by two all the darts of the orbit -D1=\f$ \langle{}\f$\f$ \beta_1\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$(`dh1`) and -D2=\f$ \langle{}\f$\f$ \beta_0\f$,\f$ \beta_2\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$ (`dh2`) -such that d2=f(d1), f being the bijection between D1 and D2 -satisfying: f(dh1)=dh2, and for all e\f$ \in\f$D1, for all +D1=\f$ \langle{}\f$\f$ \beta_1\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$(`*dh1`) and +D2=\f$ \langle{}\f$\f$ \beta_0\f$,\f$ \beta_2\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$(`*dh2`) +such that d2=f(d1). + +f is the bijection between D1 and D2 +satisfying: f(*dh1)=*dh2, and for all e\f$ \in\f$D1, for all j\f$ \in\f${1,\f$ \ldots\f$,i-2,i+2,\f$ \ldots\f$,d}, f(\f$ \beta_j\f$(e))=\f$ \beta_j^{-1}\f$(f(e)). @@ -511,20 +558,20 @@ is called on the two attributes attr1 and attr2. Then, the attribute attr1 is associated to all darts of the resulting j-cell. Finally, attribute attr2 is removed from the combinatorial map. -\pre `cm.is_sewable(dh1,dh2)`. +\pre \ref CombinatorialMap::is_sewable "is_sewable(dh1,dh2)". \advanced If `update_attributes` is `false`, non void attributes are -not updated; thus the combinatorial map can be no more valid after this modification. +not updated; thus the combinatorial map can be no more valid after this operation. */ template void sew(Dart_handle dh1, Dart_handle dh2, bool update_attributes=true); /*! - i-unsew darts `dh` and \f$ \beta_i\f$`(dh)`, by keeping the combinatorial map valid. + i-unsew darts `*dh` and \f$ \beta_i\f$`(*dh)`, by keeping the combinatorial map valid. Unlinks by \f$ \beta_i\f$ all the darts in the orbit -\f$ \langle{}\f$\f$ \beta_1\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$(`dh`). If +\f$ \langle{}\f$\f$ \beta_1\f$,\f$ \ldots\f$,\f$ \beta_{i-2}\f$,\f$ \beta_{i+2}\f$,\f$ \ldots\f$,\f$ \beta_d\f$\f$ \rangle{}\f$(`*dh`). If `update_attributes` is `true`, when necessary, non void attributes are updated to ensure the validity of the combinatorial map: for each j-cell c split in two j-cells c1 and c2 by the @@ -534,32 +581,35 @@ belonging to c2 are associated with this new attribute. Finally, the functor \ref CellAttribute::On_split "Attribute_type::type::On_split" is called on the two attributes attr1 and attr2. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, `*dh`\f$ \in\f$`cm.darts()` and `dh` is not i-free. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + `*dh`\f$ \in\f$`darts()` and `*dh` is not i-free. \advanced If `update_attributes` is `false`, non void attributes are -not updated thus the combinatorial map can be no more valid after this modification. +not updated thus the combinatorial map can be no more valid after this operation. */ template void unsew(Dart_handle dh, bool update_attributes=true); /*! -Links `dh1` and `dh2` by \f$ \beta_i\f$. -The combinatorial map can be no more valid after this modification. If -`update_attributes` is true, non void attributes of `dh1` and -`dh2` are updated: if one dart has an attribute and the second +Links `*dh1` and `*dh2` by \f$ \beta_i\f$. +The combinatorial map can be no more valid after this operation. If +`update_attributes` is 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`. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, `*dh1`\f$ \in\f$`cm.darts()`, `*dh2`\f$ \in\f$`cm.darts()` and (i\f$ <\f$ 2 or `dh1`\f$ \neq\f$`dh2`). +the attribute of `*dh1` is associated to `*dh2`. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + `*dh1`\f$ \in\f$`darts()`, `*dh2`\f$ \in\f$`darts()` and (i\f$ <\f$ 2 or `dh1`\f$ \neq\f$`dh2`). */ template void link_beta(Dart_handle dh1, Dart_handle dh2, bool update_attributes=true); /*! -Unlinks `dh` and \f$ \beta_i\f$(`dh`) by \f$ \beta_i\f$. -The combinatorial map can be no more valid after this modification. -Attributes of `dh` and \f$ \beta_i\f$(`dh`) +Unlinks `*dh` and \f$ \beta_i\f$(`*dh`) by \f$ \beta_i\f$. +The combinatorial map can be no more valid after this operation. +Attributes of `*dh` and \f$ \beta_i\f$(`*dh`) are not modified. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension, `*dh`\f$ \in\f$`cm.darts()`, and `dh` is not i-free. +\pre 0\f$ \leq\f$i\f$ \leq\f$\ref CombinatorialMap::dimension "dimension", + `*dh`\f$ \in\f$`darts()`, and `*dh` is not i-free. */ template void unlink_beta(Dart_handle dh); @@ -575,60 +625,60 @@ index. Returns -1 if there is no more available free mark. int get_new_mark() const; /*! -Returns true iff `amark` is a reserved mark of the combinatorial map. -\pre 0\f$ \leq\f$amark\f$ <\f$`NB_MARKS`. +Returns true iff `m` is a reserved mark of the combinatorial map. +\pre 0\f$ \leq\f$m\f$ <\f$\ref CombinatorialMap::NB_MARKS "NB_MARKS". */ -bool is_reserved(int amark) const; +bool is_reserved(int m) const; /*! -Returns true iff `dh` is marked for `amark`. -\pre `is_reserved(amark)` and `*dh`\f$ \in\f$`cm.darts()`. +Returns true iff `*dh` is marked for `m`. +\pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`. */ -bool is_marked(Dart_const_handle dh, int amark) const; +bool is_marked(Dart_const_handle dh, int m) const; /*! -Marks `dh` for `amark`. -\pre `is_reserved(amark)` and `*dh`\f$ \in\f$`cm.darts()`. +Marks `*dh` for `m`. +\pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`. */ -void mark(Dart_const_handle dh, int amark) const; +void mark(Dart_const_handle dh, int m) const; /*! -Unmarks `dh` for the mark `amark`. -\pre `is_reserved(amark)` and `*dh`\f$ \in\f$`cm.darts()`. +Unmarks `*dh` for the mark `m`. +\pre \ref CombinatorialMap::is_reserved "is_reserved(m)" and `*dh`\f$ \in\f$`darts()`. */ -void unmark(Dart_const_handle dh, int amark) const; +void unmark(Dart_const_handle dh, int m) const; /*! -Inverse the mark `amark` for all the darts of the combinatorial map. +Inverse the mark `m` for all the darts of the combinatorial map. All the marked darts become unmarked and all the unmarked darts become marked. -\pre `is_reserved(amark)`. +\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". */ -void negate_mark(int amark) const; +void negate_mark(int m) const; /*! -Unmarks all the darts of the combinatorial map for `amark`. -\pre `is_reserved(amark)`. +Unmarks all the darts of the combinatorial map for `m`. +\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". */ -void unmark_all(int amark) const; +void unmark_all(int m) const; /*! -Returns the number of marked darts for `amark`. -\pre `is_reserved(amark)`. +Returns the number of marked darts for `m`. +\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". */ -size_type number_of_marked_darts(int amark) const; +size_type number_of_marked_darts(int m) const; /*! -Return the number of unmarked darts for `amark`. -\pre `is_reserved(amark)`. +Return the number of unmarked darts for `m`. +\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". */ -size_type number_of_unmarked_darts(int amark) const; +size_type number_of_unmarked_darts(int m) const; /*! -Frees `amark`. -\pre `is_reserved(amark)`. +Frees mark `m`. +\pre \ref CombinatorialMap::is_reserved "is_reserved(m)". */ -void free_mark(int amark) const; +void free_mark(int m) const; /// @} }; /* end CombinatorialMap */