Some corrections in the doc.

This commit is contained in:
Guillaume Damiand 2016-08-08 09:53:37 -04:00
parent 49c44dfe74
commit 7dca2e8eb8
26 changed files with 20 additions and 20 deletions

View File

@ -287,7 +287,7 @@ Displays on `os` the number of elements of the generalized map. Its number of da
Example of output for a 3D generalized map containing two disjoint generalized tetrahedra:
<TT>\#Darts=24, \#0-cells=8, \#1-cells=12, \#2-cells=8, \#3-cells=2, \#ccs=2</TT>
<TT>\#Darts=48, \#0-cells=8, \#1-cells=12, \#2-cells=8, \#3-cells=2, \#ccs=2</TT>
*/
std::ostream& display_characteristics(std::ostream & os) const;
@ -748,7 +748,7 @@ Dart_handle make_edge();
Inserts a 0-cell in the 1-cell containing `dh`. Returns a handle on one dart belonging to the new 0-cell.
\pre \ref GeneralizedMap::dimension "dimension"\f$ \geq\f$ 1 and `*dh`\f$ \in\f$\ref GeneralizedMap::darts "darts()".
See example in \cgalFigureRef{figinsertvertex}.
See example in \cgalFigureRef{figinsertvertexgmap}.
If \link GeneralizedMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 1-attributes are non `void`, \ref CellAttribute::On_split "Attribute_type<1>::type::On_split"(<I>a</I>,<I>a'</I>) is called, with <I>a</I> the original 1-attribute associated with <I>dh</I> and <I>a'</I> the new 1-attribute created during the operation. If set, the dynamic onsplit function of 1-attributes is also called on <I>a</I> and <I>a'</I>.
@ -790,7 +790,7 @@ Dart_handle insert_cell_0_in_cell_2(Dart_handle dh);
Inserts a 1-cell in the 2-cell containing `dh1` and `dh2`. Returns \f$ \beta_0\f$(`dh1`), a handle on one dart belonging to the new 1-cell.
\pre `::is_insertable_cell_1_in_cell_2(dh1,dh2)`.
See example in \cgalFigureRef{figinsertedge}.
See example in \cgalFigureRef{figinsertedgegmap}.
If \link GeneralizedMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 2-attributes are non `void`, \ref CellAttribute::On_split "Attribute_type<2>::type::On_split"(<I>a</I>,<I>a'</I>) is called, with <I>a</I> the original 2-attribute associated with `dh` and <I>a'</I> the new 2-attribute created during the operation. If set, the dynamic onsplit function of 2-attributes is also called on <I>a</I> and <I>a'</I>.
@ -812,7 +812,7 @@ Dart_handle insert_cell_1_in_cell_2(Dart_handle dh1, Dart_handle dh2);
Inserts a 2-cell along the path of 1-cells containing darts given by the range `[afirst,alast)`. Returns a handle on one dart belonging to the new 2-cell.
\pre `is_insertable_cell_2_in_cell_3(afirst,alast)`.
See example in \cgalFigureRef{figinsertface}.
See example in \cgalFigureRef{figinsertfacegmap}.
If \link GeneralizedMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if 3-attributes are non `void`, \ref CellAttribute::On_split "Attribute_type<3>::type::On_split"(<I>a</I>,<I>a'</I>) is called, with <I>a</I> the original 3-attribute associated with `dh` and <I>a'</I> the new 3-attribute created during the operation. If set, the dynamic onsplit function of 3-attributes is also called on <I>a</I> and <I>a'</I>.
@ -835,7 +835,7 @@ Dart_handle insert_cell_2_in_cell_3(InputIterator afirst, InputIterator alast);
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 a handle on the dart belonging to the new 1-cell and to the new 0-cell.
\pre \ref GeneralizedMap::dimension "dimension"\f$ \geq\f$ 2 and `*dh`\f$ \in\f$\ref GeneralizedMap::darts "darts()".
See example in \cgalFigureRef{figinsertedge}.
See example in \cgalFigureRef{figinsertedgegmap}.
\cgalAdvancedBegin
If \link GeneralizedMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==false`, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.
@ -889,7 +889,7 @@ bool is_removable(Dart_const_handle dh);
Removes the <I>i</I>-cell containing `dh`. Returns the number of darts removed from the generalized map.
\pre `is_removable<i>(dh)`.
See examples in \cgalFigureRef{figinsertvertex}, \cgalFigureRef{figinsertedge} and \cgalFigureRef{figinsertface}.
See examples in \cgalFigureRef{figinsertvertexgmap}, \cgalFigureRef{figinsertedgegmap} and \cgalFigureRef{figinsertfacegmap}.
If \link GeneralizedMap::are_attributes_automatically_managed `are_attributes_automatically_managed()`\endlink`==true`, if `i`\f$ <\f$\ref GeneralizedMap::dimension "dimension", and <I>i+1</I>-attributes are non `void`, and if there are two distinct (<I>i+1</I>)-cells around dart `dh`, \ref CellAttribute::On_merge "Attribute_type<i+1>::type::On_merge"(<I>a1</I>,<I>a2</I>) is called, with <I>a1</I> the (<I>i+1</I>)-attribute associated to `dh`, and <I>a2</I> the (<I>i+1</I>)-attribute associated to \f$ \beta_{i+1}\f$(<I>dh</I>). If set, the dynamic onmerge function of <I>i+1</I>-attributes is also called on <I>a1</I> and <I>a2</I>.

View File

@ -2,7 +2,7 @@
\ingroup PkgGeneralizedMapsConcepts
\cgalConcept
The concept `GeneralizedMapItems` allows to customize a <I>d</I>D generalized map by choosing the type of darts, and by enabling and disabling some attributes. For that, it defines an inner class template named \ref GeneralizedMapItems::GDart_wrapper "GDart_wrapper", with one template parameter, `GMap`, a model of the `GeneralizedMap` concept. This inner class must define two types: `%Dart` and `%Attributes`.
The concept `GeneralizedMapItems` allows to customize a <I>d</I>D generalized map by choosing the type of darts, and by enabling and disabling some attributes. For that, it defines an inner class template named \ref GeneralizedMapItems::Dart_wrapper "Dart_wrapper", with one template parameter, `GMap`, a model of the `GeneralizedMap` concept. This inner class must define two types: `%Dart` and `%Attributes`.
\cgalHasModel \ref CGAL::Generalized_map_min_items "CGAL::Generalized_map_min_items<d>"
@ -17,7 +17,7 @@ The concept `GeneralizedMapItems` allows to customize a <I>d</I>D generalized ma
struct Exemple_Item_4
{
template < class GMap >
struct GDart_wrapper
struct Dart_wrapper
{
typedef CGAL::GDart<4, GMap> Dart;
typedef CGAL::cpp11::tuple<> Attributes;
@ -27,7 +27,7 @@ The concept `GeneralizedMapItems` allows to customize a <I>d</I>D generalized ma
struct Exemple_Item_3
{
template < class GMap >
struct GDart_wrapper
struct Dart_wrapper
{
typedef CGAL::GDart<3, GMap> Dart;
typedef CGAL::Cell_attribute<GMap, int> Edge_attrib;
@ -41,14 +41,14 @@ public:
/*!
Wrapper class defining type of darts and types of attributes.
The class `%GDart_wrapper<GMap>` must provide:
The class `%Dart_wrapper<GMap>` must provide:
- `%GDart_wrapper<GMap>::%Dart`, the type of dart, a model of the `GDart` concept.
- `%GDart_wrapper<GMap>::%Attributes` The tuple of attributes, containing at most \ref GeneralizedMap::dimension "GMap::dimension+1" types (one for each possible cell of the generalized 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 \f$ i^{\mbox{th}}\f$ type in the tuple is `void`, (<I>i</I>-1)-attributes are disabled. Otherwise, (<I>i</I>-1)-attributes are enabled and have the given type. If the size of the tuple is <I>k</I>, with <I>k</I><\ref GeneralizedMap::dimension "GMap::dimension+1", \f$ \forall\f$<I>i</I>: <I>k</I>\f$ \leq\f$<I>i</I>\f$ \leq\f$\ref GeneralizedMap::dimension "GMap::dimension", <I>i</I>-attributes are disabled.
- `%Dart_wrapper<GMap>::%Dart`, the type of dart, a model of the `GDart` concept.
- `%Dart_wrapper<GMap>::%Attributes` The tuple of attributes, containing at most \ref GeneralizedMap::dimension "GMap::dimension+1" types (one for each possible cell of the generalized 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 \f$ i^{\mbox{th}}\f$ type in the tuple is `void`, (<I>i</I>-1)-attributes are disabled. Otherwise, (<I>i</I>-1)-attributes are enabled and have the given type. If the size of the tuple is <I>k</I>, with <I>k</I><\ref GeneralizedMap::dimension "GMap::dimension+1", \f$ \forall\f$<I>i</I>: <I>k</I>\f$ \leq\f$<I>i</I>\f$ \leq\f$\ref GeneralizedMap::dimension "GMap::dimension", <I>i</I>-attributes are disabled.
\note It can be implemented using a nested template class.
*/
template <typename GMap>
using GDart_wrapper = unspecified_type;
using Dart_wrapper = unspecified_type;
}; /* end #GeneralizedMapItems */

View File

@ -351,16 +351,16 @@ If one wants to modify a generalized map <I>manually</I>, it is possible to swi
The following high level operations are defined. All these methods ensure that given a valid generalized map and a possible operation, the modified generalized map is also valid.
The first one is `gm.remove_cell<i>(dh0)` which modifies the generalized map to remove the <I>i</I>-cell containing dart `d0`, with 0\f$ \leq\f$<I>i</I>\f$ \leq\f$<I>d</I>. This operation is possible if <I>i</I>=<I>d</I> or if the given <I>i</I>-cell is incident to at most two <I>(i+1)</I>-cells which can be tested thanks to `gm.is_removable<i>(dh0)`. If the removed <I>i</I>-cell was incident to two different <I>(i+1)</I>-cells, these two cells are merged into one <I>(i+1)</I>-cell. In this case, the \ref CellAttribute::On_merge "On_merge" functor is called if two <I>(i+1)</I>-attributes are associated to the two <I>(i+1)</I>-cells. If the <I>i</I>-cell is associated with a non void attribute, it is removed from the generalized map (see three examples on \cgalFigureRef{figinsertvertex}, \cgalFigureRef{figinsertedge} and \cgalFigureRef{figinsertface}).
The first one is `gm.remove_cell<i>(dh0)` which modifies the generalized map to remove the <I>i</I>-cell containing dart `d0`, with 0\f$ \leq\f$<I>i</I>\f$ \leq\f$<I>d</I>. This operation is possible if <I>i</I>=<I>d</I> or if the given <I>i</I>-cell is incident to at most two <I>(i+1)</I>-cells which can be tested thanks to `gm.is_removable<i>(dh0)`. If the removed <I>i</I>-cell was incident to two different <I>(i+1)</I>-cells, these two cells are merged into one <I>(i+1)</I>-cell. In this case, the \ref CellAttribute::On_merge "On_merge" functor is called if two <I>(i+1)</I>-attributes are associated to the two <I>(i+1)</I>-cells. If the <I>i</I>-cell is associated with a non void attribute, it is removed from the generalized map (see three examples on \cgalFigureRef{figinsertvertexgmap}, \cgalFigureRef{figinsertedgegmap} and \cgalFigureRef{figinsertfacegmap}).
\cgalFigureBegin{figinsertvertex,insert-vertex.svg}
\cgalFigureBegin{figinsertvertexgmap,insert-vertex.svg}
Example of `insert_cell_0_in_cell_1` and `remove_cell<0>` operations. Left: Initial generalized map. Right: After the insertion of a 0-cell in the 1-cell containing dart `d1`. Now if we remove the 0-cell containing dart `d2`, we obtain the initial generalized map.
\cgalFigureEnd
The inverse operation of the removal is the insertion operation. Several versions exist, sharing a common principle. They consist in adding a new <I>i</I>-cell "inside" an existing <I>j</I>-cell, <I>i</I>\f$ <\f$<I>j</I>, by splitting the <I>j</I>-cell into several <I>j</I>-cells. Contrary to `remove_cell<i>`, is it not possible to define a unique `insert_cell_i_in_cell_j<i,j>` function because parameters are different depending on `i` and `j`.
`gm.insert_cell_0_in_cell_1(dh0)` adds a 0-cell in the 1-cell containing dart `d0`. The 1-cell is split in two. This operation is possible if `d0`\f$ \in\f$\ref GeneralizedMap::darts "gm.darts()" (see example on \cgalFigureRef{figinsertvertex}).
`gm.insert_cell_0_in_cell_1(dh0)` adds a 0-cell in the 1-cell containing dart `d0`. The 1-cell is split in two. This operation is possible if `d0`\f$ \in\f$\ref GeneralizedMap::darts "gm.darts()" (see example on \cgalFigureRef{figinsertvertexgmap}).
`gm.insert_cell_0_in_cell_2(dh0)` adds a 0-cell in the 2-cell containing dart `d0`. The 2-cell is split in triangles, one for each initial edge of the facet. This operation is possible if `d0`\f$ \in\f$\ref GeneralizedMap::darts "gm.darts()" (see example on \cgalFigureRef{figtriangulate}).
@ -368,18 +368,18 @@ The inverse operation of the removal is the insertion operation. Several version
Example of `insert_cell_0_in_cell_2` operation.
\cgalFigureEnd
`gm.insert_cell_1_in_cell_2(dh1,dh2)` adds a 1-cell in the 2-cell containing darts `d1` and `d2`, between the two 0-cells containing darts `d1` and `d2`. The 2-cell is split in two. This operation is possible if <I>d1</I>\f$ \in\f$\f$ \langle{}\f$\f$ \alpha_1\f$\f$ \rangle{}\f$(<I>d2</I>) which can be tested thanks to `gm.is_insertable_cell_1_in_cell_2(dh1,dh2)`. In the example on \cgalFigureRef{figinsertedge}, it is possible to insert an edge between darts <I>d2</I> and <I>d3</I>, but it is not possible to insert an edge between <I>d1</I> and <I>d3</I>.
`gm.insert_cell_1_in_cell_2(dh1,dh2)` adds a 1-cell in the 2-cell containing darts `d1` and `d2`, between the two 0-cells containing darts `d1` and `d2`. The 2-cell is split in two. This operation is possible if <I>d1</I>\f$ \in\f$\f$ \langle{}\f$\f$ \alpha_1\f$\f$ \rangle{}\f$(<I>d2</I>) which can be tested thanks to `gm.is_insertable_cell_1_in_cell_2(dh1,dh2)`. In the example on \cgalFigureRef{figinsertedgegmap}, it is possible to insert an edge between darts <I>d2</I> and <I>d3</I>, but it is not possible to insert an edge between <I>d1</I> and <I>d3</I>.
\cgalFigureBegin{figinsertedge,insert-edge.svg}
\cgalFigureBegin{figinsertedgegmap,insert-edge.svg}
Example of `insert_cell_1_in_cell_2` and `remove_cell<1>` operations. Left: Initial generalized map. Right: After the insertion of two 1-cells: a first one between the two 0-cells containing darts `d2` and `d3`, and a second one incident to the 0-cell containing dart `d1`. Now if we remove the two 1-cells containing darts `d4` and `d5`, we obtain the initial generalized map.
\cgalFigureEnd
`gm.insert_dangling_cell_1_in_cell_2(dh0)` adds a 1-cell in the 2-cell containing dart `d0`, the 1-cell being attached by only one of its vertex to the 0-cell containing dart `d0`. This operation is possible if `d0`\f$ \in\f$\ref GeneralizedMap::darts "gm.darts()".
`gm.insert_cell_2_in_cell_3(itbegin,itend)` adds a 2-cell in the 3-cell containing all the darts between `itbegin` and `itend`, along the path of 1-cells containing darts in [`itbegin`,`itend`). The 3-cell is split in two. This operation is possible if all the darts in [`itbegin`,`itend`) form a closed path inside a same 3-cell which can be tested thanks to `gm.is_insertable_cell_2_in_cell_3(itbegin,itend)` (see example on \cgalFigureRef{figinsertface}).
`gm.insert_cell_2_in_cell_3(itbegin,itend)` adds a 2-cell in the 3-cell containing all the darts between `itbegin` and `itend`, along the path of 1-cells containing darts in [`itbegin`,`itend`). The 3-cell is split in two. This operation is possible if all the darts in [`itbegin`,`itend`) form a closed path inside a same 3-cell which can be tested thanks to `gm.is_insertable_cell_2_in_cell_3(itbegin,itend)` (see example on \cgalFigureRef{figinsertfacegmap}).
\cgalFigureBegin{figinsertface,insert-facet.svg}
\cgalFigureBegin{figinsertfacegmap,insert-facet.svg}
Example of `insert_cell_2_in_cell_3` and `remove_cell` operations. Left: Initial generalized map. Right: After the insertion of a 2-cell along the path of 1-cells containing respectively `d1,d2,d3,d4`. Now if we remove the 2-cell containing dart `d5`, we obtain the initial generalized map.
\cgalFigureEnd