\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.4 - High-dimension Triangulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
TriangulationDSFullCell Concept Reference

Inherited by CGAL::Triangulation_full_cell< TriangulationTraits, Data, TriangulationDSFullCell >.

Definition

The concept TriangulationDSFullCell describes what a full cell is in a model of the concept TriangulationDataStructure. It sets requirements of combinatorial nature only, as geometry is not concerned here. In the context of triangulation, the term full cell refers to a face of maximal dimension. This maximality characteristic is emphasized by using the adjective full.

A TriangulationDSFullCell is responsible for storing handles to the vertices of a full cell as well as handles to its neighbors.

Has Models:

CGAL::Triangulation_ds_full_cell<TriangulationDataStructure,DSFullCellStoragePolicy>

CGAL::Triangulation_full_cell<TriangulationTraits, Data, TriangulationDSFullCell>

Input/Output

These operators can be used directly and are called by the I/O operator of class TriangulationDataStructure.

See Also
TriangulationDSVertex
TriangulationDSFace
TriangulationDataStructure
Triangulation

Public Member Functions

Vertex_handle mirror_vertex (const int i, const int cur_dim) const
 Returns a handle to the mirror vertex of the i-th vertex of full cell c. More...
 

Types

typedef Hidden_type Triangulation_data_structure
 
 
typedef Hidden_type Vertex_handle
 A handle to a vertex. More...
 
typedef Hidden_type Vertex_handle_iterator
 An iterator over the handles to the vertices of the full cell. More...
 
typedef Hidden_type Full_cell_handle
 A handle to a full cell. More...
 
typedef
TriangulationDataStructure::Full_cell_data 
TDS_data
 A data member of this type has to be stored and accessible through access function below. More...
 
template<typename TDS2 >
using Rebind_TDS = unspecified_type
 This nested template class has to define a type Rebind_TDS<TDS2>::Other which is the rebound vertex, that is, the one that will be actually used by Triangulation_data_structure. More...
 

Creation

If you want to create a full cell as part of a TriangulationDataStructure, you would rather want to call the new_full_cell() from the latter concept, as it is not possible to incorporate an existing external full cell into a triangulation.

 TriangulationDSFullCell (int dmax)
 Sets the maximum possible dimension of the full cell. More...
 
 TriangulationDSFullCell (const TriangulationDSFullCell &fc)
 Copy constructor. More...
 

Access functions

int maximal_dimension () const
 Returns one less than the maximum number of vertices that the full cell can store. More...
 
Vertex_handle_iterator vertices_begin () const
 Returns an iterator to the first Vertex_handle stored in the full cell. More...
 
Vertex_handle_iterator vertices_end () const
 Returns an iterator pointing beyond the last Vertex_handle stored in the full cell. More...
 
Vertex_handle vertex (const int i) const
 Returns the i-th vertex of the full cell. More...
 
Full_cell_handle neighbor (const int i) const
 Returns the full cell opposite to the i-th vertex of the full cell c. More...
 
int mirror_index (const int i) const
 Returns the index j of the full cell cas a neighbor in the full cell c.neighbor(i);. More...
 
int index (Full_cell_handle n) const
 Returns the index i such that c.neighbor(i)==n. More...
 
int index (Vertex_handle v) const
 Returns the index i of the vertex v such that c.vertex(i)==v. More...
 

Internal

Advanced

These functions are used internally by the triangulation data structure.

The user is not encouraged to use them directly as they may change in the future.

const TDS_datatds_data () const
 Returns the data member of type TDS_data. More...
 
TDS_datatds_data ()
 Same as above, but returns a reference to a non-const object. More...
 

Update functions

void set_vertex (const int i, Vertex_handle v)
 Sets the \( i\)-th vertex of the full cell. More...
 
void set_neighbor (const int i, Full_cell_handle n)
 Sets the i-th neighbor of c to n. More...
 
void set_mirror_index (const int i, const int index)
 Sets the mirror index of the \( i\)-th vertex of c to index. More...
 
void swap_vertices (int d1, int d2)
 Switches the orientation of the full cell c by swapping its vertices with index d1 and d2. More...
 

Queries

bool has_vertex (Vertex_handle v) const
 Returns true if the vertex v is a vertex of the full cell c. More...
 
bool has_vertex (Vertex_handle v, int &ret) const
 Returns true and sets the value of ret to the index of v in c if the vertex v is a vertex of the full cell c. More...
 
bool has_neighbor (Full_cell_handle n) const
 Returns true if the full cell n is a neighbor of the full cell c. More...
 
bool has_neighbor (Full_cell_handle n, int &ret) const
 Returns true and sets the value of ret to the index of n as a neighbor of c if the full cell n is a neighbor of the full cell c. More...
 

Validity check

bool is_valid (bool verbose=false) const
 Performs some validity checks on the full cell c. More...
 

Memory management

These member functions are required by Triangulation_data_structure because it uses Compact_container to store its cells.

See the documentation of Compact_container for the exact requirements.

void * for_compact_container () const
 
void *& for_compact_container ()
 
template<class TriangulationDataStructure >
std::ostream & operator<< (std::ostream &os, const Triangulation_ds_full_cell< TriangulationDataStructure > &c)
 
 
template<class TriangulationDataStructure >
std::istream & operator>> (std::istream &is, Triangulation_ds_full_cell< TriangulationDataStructure > &c)
 
 

Member Typedef Documentation

A handle to a full cell.

It must be the same as the nested type TriangulationDataStructure::Full_cell_handle.

template<typename TDS2 >
using TriangulationDSFullCell::Rebind_TDS = unspecified_type

This nested template class has to define a type Rebind_TDS<TDS2>::Other which is the rebound vertex, that is, the one that will be actually used by Triangulation_data_structure.

The Rebind_TDS<TDS2>::Other type will be the real base class of Triangulation_data_structure::Full_cell.

Note
It can be implemented using a nested template class.

A data member of this type has to be stored and accessible through access function below.

Modifications:
The Triangulation_data_structure in which the TriangulationDSFullCell is defined/used.

Must be a model of the TriangulationDataStructure concept.

A handle to a vertex.

It must be the same as the nested type TriangulationDataStructure::Vertex_handle.

An iterator over the handles to the vertices of the full cell.

Constructor & Destructor Documentation

TriangulationDSFullCell::TriangulationDSFullCell ( int  dmax)

Sets the maximum possible dimension of the full cell.

TriangulationDSFullCell::TriangulationDSFullCell ( const TriangulationDSFullCell fc)

Copy constructor.

Member Function Documentation

void* TriangulationDSFullCell::for_compact_container ( ) const
void* & TriangulationDSFullCell::for_compact_container ( )
bool TriangulationDSFullCell::has_neighbor ( Full_cell_handle  n) const

Returns true if the full cell n is a neighbor of the full cell c.

Returns false otherwise.

bool TriangulationDSFullCell::has_neighbor ( Full_cell_handle  n,
int &  ret 
) const

Returns true and sets the value of ret to the index of n as a neighbor of c if the full cell n is a neighbor of the full cell c.

Returns false otherwise.

bool TriangulationDSFullCell::has_vertex ( Vertex_handle  v) const

Returns true if the vertex v is a vertex of the full cell c.

Returns false otherwise.

bool TriangulationDSFullCell::has_vertex ( Vertex_handle  v,
int &  ret 
) const

Returns true and sets the value of ret to the index of v in c if the vertex v is a vertex of the full cell c.

Returns false otherwise.

int TriangulationDSFullCell::index ( Full_cell_handle  n) const

Returns the index i such that c.neighbor(i)==n.

Precondition
n must be a neighbor of c.
int TriangulationDSFullCell::index ( Vertex_handle  v) const

Returns the index i of the vertex v such that c.vertex(i)==v.

Precondition
v must be a vertex of the c.
bool TriangulationDSFullCell::is_valid ( bool  verbose = false) const

Performs some validity checks on the full cell c.

It must at least check that for each existing neighbor n, c is also a neighbor of n.

Returns true if all the tests pass, false if any test fails. See the documentation for the models of this concept to see the additionnal (if any) validity checks that they implement.

int TriangulationDSFullCell::maximal_dimension ( ) const

Returns one less than the maximum number of vertices that the full cell can store.

This does not return the dimension of the actual full cell stored in c.

int TriangulationDSFullCell::mirror_index ( const int  i) const

Returns the index j of the full cell cas a neighbor in the full cell c.neighbor(i);.

If the returned integer is not negative, it holds that c.neighbor(i)->neighbor(j) == c. Returns -1 if chas no adjacent full cell of index i.

Precondition
\(0 \leq i \leq \) maximal_dimension().
Vertex_handle TriangulationDSFullCell::mirror_vertex ( const int  i,
const int  cur_dim 
) const

Returns a handle to the mirror vertex of the i-th vertex of full cell c.

Advanced

This function works even if the adjacency information stored in the neighbor full cell *c.neighbor(i) is corrupted. This is useful when temporary corruption is necessary during surgical operations on a triangulation.

Precondition
\(0 \leq i,\) cur_dim \( \leq \) maximal_dimension().
Full_cell_handle TriangulationDSFullCell::neighbor ( const int  i) const

Returns the full cell opposite to the i-th vertex of the full cell c.

Precondition
\(0 \leq i \leq \)maximal_dimension().
template<class TriangulationDataStructure >
std::ostream& TriangulationDSFullCell::operator<< ( std::ostream &  os,
const Triangulation_ds_full_cell< TriangulationDataStructure > &  c 
)

Modifications:
Writes (possibly) non-combinatorial information about full cell c to the stream os.
template<class TriangulationDataStructure >
std::istream& TriangulationDSFullCell::operator>> ( std::istream &  is,
Triangulation_ds_full_cell< TriangulationDataStructure > &  c 
)

Modifications:
Reads from stream is the full cell information written by operator<<.
void TriangulationDSFullCell::set_mirror_index ( const int  i,
const int  index 
)

Sets the mirror index of the \( i\)-th vertex of c to index.

This corresponds to the index, in c->neighbor(i), of the full cell c.

Note: a model of this concept may choose not to store mirror indices, in which case this function should do nothing.

Precondition
\(0 \leq i \leq \)maximal_dimension().
void TriangulationDSFullCell::set_neighbor ( const int  i,
Full_cell_handle  n 
)

Sets the i-th neighbor of c to n.

Full cell n is opposite to the \( i\)-th vertex of c.

Precondition
\(0 \leq i \leq \)maximal_dimension().
void TriangulationDSFullCell::set_vertex ( const int  i,
Vertex_handle  v 
)

Sets the \( i\)-th vertex of the full cell.

Precondition
\(0 \leq i \leq \) maximal_dimension().
void TriangulationDSFullCell::swap_vertices ( int  d1,
int  d2 
)

Switches the orientation of the full cell c by swapping its vertices with index d1 and d2.

Precondition
\(0 \leq d1,d2 \leq \)maximal_dimension().
const TDS_data& TriangulationDSFullCell::tds_data ( ) const

Returns the data member of type TDS_data.

It is typically used to mark the full cell as visited during operations on a TriangulationDataStructure.

TDS_data& TriangulationDSFullCell::tds_data ( )

Same as above, but returns a reference to a non-const object.

Vertex_handle TriangulationDSFullCell::vertex ( const int  i) const

Returns the i-th vertex of the full cell.

Precondition
\(0 \leq i \leq \) maximal_dimension().
Vertex_handle_iterator TriangulationDSFullCell::vertices_begin ( ) const

Returns an iterator to the first Vertex_handle stored in the full cell.

Vertex_handle_iterator TriangulationDSFullCell::vertices_end ( ) const

Returns an iterator pointing beyond the last Vertex_handle stored in the full cell.