CGAL 6.1.2 - Linear Cell Complex: LinearCellComplex Concept Reference

CGAL 6.1.2 - Linear Cell Complex

Loading...
Searching...
No Matches
List of all members
LinearCellComplex Concept Reference
Reference Manual » Concepts

## Definition

The concept `LinearCellComplex` represents a linear cell complex in dimension `d`, in an ambient space of dimension `d2`. This is a model of the concept of `GenericMap` adding a requirement to ensure that each vertex of the map is associated with a model of `CellAttributeWithPoint`.

Refines
  `GenericMap`

Has models
  `CGAL::Linear_cell_complex_for_combinatorial_map<d,d2,LCCTraits,Items,Alloc>`
  `CGAL::Linear_cell_complex_for_generalized_map<d,d2,LCCTraits,Items,Alloc>`

See also
  `LinearCellComplexItems`
  `LinearCellComplexTraits`

## Types
typedef Traits::FT | FT
typedef Traits::Point | Point
typedef Traits::Vector | Vector
typedef unspecified_type | Vertex_attribute
| Type of 0-attributes, a model of `CellAttributeWithPoint` concept (a shortcut for `Attribute_type<0>::type` ).
typedef unspecified_type | Vertex_attribute_descriptor
| Descriptor through 0-attributes (a shortcut for `Attribute_descriptor<0>::type` ).
typedef unspecified_type | Vertex_attribute_const_descriptor
| Const descriptor through 0-attributes (a shortcut for `Attribute_const_descriptor<0>::type` ).
typedef unspecified_type | Vertex_attribute_range
| Range of all the 0-attributes, a model of the `Range` concept (a shortcut for `Attribute_range<0>::type` ).
typedef unspecified_type | Vertex_attribute_const_range
| Const range of all the 0-attributes, a model of the `ConstRange` concept a shortcut for `Attribute_const_range<0>::type` ).

## Constants
static unsigned int | ambient_dimension
| Ambient dimension, must be > 1.

## Creation
| LinearCellComplex ()
| Default constructor creating an empty linear cell complex.

## Range Access Member Functions
Vertex_attribute_range & | vertex_attributes ()
| Returns a range of all the 0-attributes in this linear cell complex (a shortcut for `attributes<0>()`).
Vertex_attribute_const_range & | vertex_attributes () const
| Returns a const range of all the 0-attributes in this linear cell complex (a shortcut for `attributes<0>() const`).

## Access Member Functions
bool | is_valid () const
| Returns true iff this linear cell complex is valid.
size_type | number_of_vertex_attributes () const
| Returns the number of 0-attributes in this linear cell complex (a shortcut for `number_of_attributes<0>()`).
Vertex_attribute_descriptor | vertex_attribute (Dart_descriptor d)
| Returns the 0-attribute associated with `d`.
Vertex_attribute_const_descriptor | vertex_attribute (Dart_const_descriptor d)
| Returns the 0-attribute associated with `d`, when `d` is const.
Point & | point_of_vertex_attribute (Vertex_attribute_descriptor v)
| Returns the point in the 0-attribute `v`.
const Point & | point_of_vertex_attribute (Vertex_attribute_const_descriptor v) const
| Returns the point in the 0-attribute `v`, when `v` is const.
Point & | point (Dart_descriptor d)
| Returns the point in the 0-attribute associated with `d`.
const Point & | point (Dart_const_descriptor d) const
| Returns the point in the 0-attribute associated with `d`, when `d` is const.

## Modifiers
Dart_descriptor | create_dart (Vertex_attribute_descriptor v)
| Creates a new dart in this linear cell complex, sets its associated 0-attribute to `v` and returns the corresponding descriptor.
Dart_descriptor | create_dart (const Point &apoint)
| Creates a new dart in this linear cell complex, creates a new 0-attribute initialized with `apoint`, sets the associated 0-attribute of the new dart to this new 0-attribute, and returns the corresponding descriptor.
template<typename T1 >
Vertex_attribute_descriptor | create_vertex_attribute (T1 t1)
| Creates a new 0-attribute in this linear cell complex, and returns the corresponding descriptor (a shortcut for `create_attribute<0>(t1)`).
void | erase_vertex_attribute (Vertex_attribute_descriptor v)
| Removes the 0-attribute pointed to by `v` from this linear cell complex (a shortcut for `erase_attribute<0>(v)`).
void | set_vertex_attribute (Dart_descriptor d, Vertex_attribute_descriptor v)
| Associates the 0-attribute of all the darts of the 0-cell containing `d` to `v` (a shortcut for `set_attribute<0>(d,v)`).

## Attributes management
void | correct_invalid_attributes ()
| Correct the invalid attributes of the linear cell complex.

## Operations
template<unsigned int i>
Point | barycenter (Dart_const_descriptor d) const
| Returns the barycenter of the i-cell containing `d`.
template<unsigned int i>
Dart_descriptor | insert_point_in_cell (Dart_descriptor d, Point p)
| Inserts a point, copy of `p`, in the i-cell containing `d`.
template<unsigned int i>
Dart_descriptor | insert_barycenter_in_cell (Dart_descriptor d)
| Inserts a point in the barycenter of the i-cell containing `d`.
Dart_descriptor | insert_dangling_cell_1_in_cell_2 (Dart_descriptor d, Point p)
| Inserts a 1-cell in the 2-cell containing `d`, the 1-cell being attached only by one of its vertex to the 0-cell containing `d`.

## Constructions
Dart_descriptor | make_segment (const Point &p0, const Point &p1)
| Creates an isolated segment in this linear cell complex (two darts linked by \( \beta_2\)) having `p0`, `p1` as points.
Dart_descriptor | make_triangle (const Point &p0, const Point &p1, const Point &p2)
| Creates an isolated triangle in this linear cell complex having `p0`, `p1`, `p2` as points.
Dart_descriptor | make_quadrangle (const Point &p0, const Point &p1, const Point &p2, const Point &p3)
| Creates an isolated quadrangle in this linear cell complex having `p0`, `p1`, `p2`, `p3` as points.
Dart_descriptor | make_tetrahedron (const Point &p0, const Point &p1, const Point &p2, const Point &p3)
| Creates an isolated tetrahedron in this linear cell complex having `p0`, `p1`,`p2`,`p3` as points.
Dart_descriptor | make_hexahedron (const Point &p0, const Point &p1, const Point &p2, const Point &p3, const Point &p4, const Point &p5, const Point &p6, const Point &p7)
| Creates an isolated hexahedron in this linear cell complex having `p0`, `p1`, `p2`, `p3`, `p4`, `p5`, `p6`, `p7` as points.

## Member Typedef Documentation

## ◆ Vertex_attribute_const_range

typedef unspecified_type LinearCellComplex::Vertex_attribute_const_range

Const range of all the 0-attributes, a model of the `ConstRange` concept a shortcut for `Attribute_const_range<0>::type` ).

Iterator inner type is bidirectional iterator and value type is `Vertex_attribute`.

## ◆ Vertex_attribute_range

typedef unspecified_type LinearCellComplex::Vertex_attribute_range

Range of all the 0-attributes, a model of the `Range` concept (a shortcut for `Attribute_range<0>::type` ).

Iterator inner type is bidirectional iterator and value type is `Vertex_attribute`.

## Member Function Documentation

## ◆ barycenter()

template<unsigned int i>

Point LinearCellComplex::barycenter | ( | Dart_const_descriptor | d | ) | const

Returns the barycenter of the i-cell containing `d`.

Precondition
  1 \( \leq \) i \( \leq \) `dimension` and `d` \( \in \) `darts()`.

## ◆ correct_invalid_attributes()

void LinearCellComplex::correct_invalid_attributes | ( |  | ) |

Correct the invalid attributes of the linear cell complex.

We can have invalid attribute either if we have called `set_automatic_attributes_management(false)` before to use some modification operations or if we have modified the combinatorial map by using low level operations.

The validation process of a linear cell complex validates its generic map (cf. `correct_invalid_attributes()`), and for each dart `d` having no vertex attribute, a new vertex attribute is created, with its Point initialized to `CGAL::Origin`, and all the darts of the 0-cell containing `d` are linked with the new attribute.

## ◆ create_dart()

Dart_descriptor LinearCellComplex::create_dart | ( | Vertex_attribute_descriptor | v | ) |

Creates a new dart in this linear cell complex, sets its associated 0-attribute to `v` and returns the corresponding descriptor.

Precondition
  `v` \( \in \) `vertex_attributes()`.

## ◆ create_vertex_attribute()

template<typename T1 >

Vertex_attribute_descriptor LinearCellComplex::create_vertex_attribute | ( | T1 | t1 | ) |

Creates a new 0-attribute in this linear cell complex, and returns the corresponding descriptor (a shortcut for `create_attribute<0>(t1)`).

Calls the constructor of `Vertex_attribute` having `T1` as parameter. Overloads of this member function are defined that take from zero to nine arguments. With zero argument, `create_vertex_attribute()` creates a new 0-attribute by using the default constructor.

## ◆ erase_vertex_attribute()

void LinearCellComplex::erase_vertex_attribute | ( | Vertex_attribute_descriptor | v | ) |

Removes the 0-attribute pointed to by `v` from this linear cell complex (a shortcut for `erase_attribute<0>(v)`).

Precondition
  `v` \( \in \) `vertex_attributes()`.

## ◆ insert_barycenter_in_cell()

template<unsigned int i>

Dart_descriptor LinearCellComplex::insert_barycenter_in_cell | ( | Dart_descriptor | d | ) |

Inserts a point in the barycenter of the i-cell containing `d`.

Returns a descriptor on one dart of this cell.

Precondition
  i \( \leq \) `dimension` \( \leq \) 2 and `d` \( \in \) `darts()`.

If `are_attributes_automatically_managed()``==true`, if i-attributes are non void, `Attribute_type<i>::type::On_split`(a,a') is called, with a the original i-attribute associated with d and a' each new i-attribute created during the operation.

Advanced

If `are_attributes_automatically_managed()``==false`, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.

## ◆ insert_dangling_cell_1_in_cell_2()

Dart_descriptor LinearCellComplex::insert_dangling_cell_1_in_cell_2 | ( | Dart_descriptor | d,
|  | Point | p
| ) |  |

Inserts a 1-cell in the 2-cell containing `d`, the 1-cell being attached only by one of its vertex to the 0-cell containing `d`.

The second vertex is associated with a new 0-attribute containing a copy of `p` as point. Returns a descriptor on one dart belonging to the new 0-cell.

Precondition
  2 \( \leq \) `dimension` and `d` \( \in \) `darts()`.

Advanced

If `are_attributes_automatically_managed()``==false`, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.

## ◆ insert_point_in_cell()

template<unsigned int i>

Dart_descriptor LinearCellComplex::insert_point_in_cell | ( | Dart_descriptor | d,
|  | Point | p
| ) |  |

Inserts a point, copy of `p`, in the i-cell containing `d`.

Returns a descriptor on one dart of this cell.

Precondition
  i \( \leq \) `dimension` \( \leq \) 2 and `d` \( \in \) `darts()`.

If `are_attributes_automatically_managed()``==true`, if i-attributes are non void, `Attribute_type<i>::type::On_split`(a,a') is called, with a the original i-attribute associated with d and a' each new i-attribute created during the operation.

Advanced

If `are_attributes_automatically_managed()``==false`, non void attributes are not updated; thus the combinatorial map can be no more valid after this operation.

## ◆ is_valid()

bool LinearCellComplex::is_valid | ( |  | ) | const

Returns true iff this linear cell complex is valid.

A linear cell complex `lcc` is valid if it is a valid generic map (cf. `GenericMap::is_valid()`), and if for each dart descriptor d such that `d` \( \in \) `darts()`: `vertex_attribute(d)`!=`null_descriptor`.

## ◆ make_hexahedron()

Dart_descriptor LinearCellComplex::make_hexahedron | ( | const Point & | p0,
|  | const Point & | p1,
|  | const Point & | p2,
|  | const Point & | p3,
|  | const Point & | p4,
|  | const Point & | p5,
|  | const Point & | p6,
|  | const Point & | p7
| ) |  |

Creates an isolated hexahedron in this linear cell complex having `p0`, `p1`, `p2`, `p3`, `p4`, `p5`, `p6`, `p7` as points.

Returns a descriptor on the dart associated with `p0`, with edge [`p0`,`p5`] and belonging to the 2-cell having `p0`, `p5`, `p6`, `p1` as points.

Precondition
  `dimension` \( \geq \) 2.

Example of r=lcc.make_hexahedron(p0,p1,p2,p3,p4,p5,p6,p7), left for combinatorial map as combinatorial data-structure, right for generalized maps.

## ◆ make_quadrangle()

Dart_descriptor LinearCellComplex::make_quadrangle | ( | const Point & | p0,
|  | const Point & | p1,
|  | const Point & | p2,
|  | const Point & | p3
| ) |  |

Creates an isolated quadrangle in this linear cell complex having `p0`, `p1`, `p2`, `p3` as points.

Returns a descriptor on the dart associated with `p0` and with edge [`p0`,`p1`].

Precondition
  `dimension` \( \geq\) 1.

Example of r=lcc.make_quadrangle(p0,p1,p2,p3), left for combinatorial map as combinatorial data-structure, right for generalized maps.

## ◆ make_segment()

Dart_descriptor LinearCellComplex::make_segment | ( | const Point & | p0,
|  | const Point & | p1
| ) |  |

Creates an isolated segment in this linear cell complex (two darts linked by \( \beta_2\)) having `p0`, `p1` as points.

Returns a descriptor on the dart associated with `p0`.

Precondition
  `dimension` \( \geq\) 2.

Example of r=lcc.make_segment(p0,p1), left for combinatorial map as combinatorial data-structure, right for generalized maps.

## ◆ make_tetrahedron()

Dart_descriptor LinearCellComplex::make_tetrahedron | ( | const Point & | p0,
|  | const Point & | p1,
|  | const Point & | p2,
|  | const Point & | p3
| ) |  |

Creates an isolated tetrahedron in this linear cell complex having `p0`, `p1`,`p2`,`p3` as points.

Returns a descriptor on the dart associated with `p0`, with edge [`p0`,`p1`] and belonging to the 2-cell having `p0`, `p1`, `p2` as points.

Precondition
  `dimension` \( \geq\) 2.

Example of r=lcc.make_tetrahedron(p0,p1,p2,p3), left for combinatorial map as combinatorial data-structure, right for generalized maps.

## ◆ make_triangle()

Dart_descriptor LinearCellComplex::make_triangle | ( | const Point & | p0,
|  | const Point & | p1,
|  | const Point & | p2
| ) |  |

Creates an isolated triangle in this linear cell complex having `p0`, `p1`, `p2` as points.

Returns a descriptor on the dart associated with `p0` and with edge [`p0`,`p1`].

Precondition
  `dimension` \( \geq\) 1.

Example of r=lcc.make_triangle(p0,p1,p2), left for combinatorial map as combinatorial data-structure, right for generalized maps.

## ◆ set_vertex_attribute()

void LinearCellComplex::set_vertex_attribute | ( | Dart_descriptor | d,
|  | Vertex_attribute_descriptor | v
| ) |  |

Associates the 0-attribute of all the darts of the 0-cell containing `d` to `v` (a shortcut for `set_attribute<0>(d,v)`).

Precondition
  `d` \( \in \) `darts()` and `v` \( \in \) `vertex_attributes()`.