CGAL 6.1 - Homological Discrete Vector Fields
Loading...
Searching...
No Matches

#include <CGAL/HDVF/Simplex.h>

Definition

The class Simplex is used by the class Abstract_simplicial_chain_complex to implement the structure de simplex (i.e. cells of a simplicial complex).

Simplices are described by the set of the indices of their vertices (see the documentation of Abstract_simplicial_chain_complex for examples).

Public Types

typedef std::set< size_t >::const_iterator const_iterator
 Constant iterator over the vertices of a simplex.
 

Public Member Functions

const_iterator cbegin ()
 Returning a constant iterator on the first vertex of the simplex.
 
const_iterator cend ()
 Returning a constant iterator after the last vertex of the simplex.
 
 Simplex (const std::set< size_t > &vertices)
 Constructor from a set of vertices indices.
 
int dimension () const
 Returns the dimension of a simplex.
 
std::vector< Simplexboundary () const
 Returns the boundary of a simplex.
 
const std::set< size_t > & get_vertices () const
 Gets the set of vertices indices of the simplex.
 
bool operator< (const Simplex &other) const
 Comparison operator.
 

Friends

template<typename _CoefficientType >
class Abstract_simplicial_chain_complex
 
std::ostream & operator<< (std::ostream &out, const Simplex &simplex)
 Outputs a simplex.
 

Constructor & Destructor Documentation

◆ Simplex()

CGAL::HDVF::Simplex::Simplex ( const std::set< size_t > &  vertices)

Constructor from a set of vertices indices.

Parameters
[in]verticesSet of the simplex vertices indices (a simplex of dimension \(q\) has \(q+1\) vertices.

Member Function Documentation

◆ boundary()

std::vector< Simplex > CGAL::HDVF::Simplex::boundary ( ) const

Returns the boundary of a simplex.

The method returns the vector of the simplices in the boundary of the object.

◆ dimension()

int CGAL::HDVF::Simplex::dimension ( ) const

Returns the dimension of a simplex.

A simplex of dimension \(q\) has \(q+1\) vertices.

◆ operator<()

bool CGAL::HDVF::Simplex::operator< ( const Simplex other) const

Comparison operator.

Compare the object with another simplex according to the lexicographical order on vertices indices sets.

Parameters
[in]otherCompare this with other (returns this < other).