|
CGAL 6.2 - Homological Discrete Vector Fields
|
#include <CGAL/HDVF/Simplex.h>
The class Simplex is used by the class Abstract_simplicial_chain_complex to represent a simplex (i.e. cells of a simplicial complex).
Simplices are described by the ordered vector of the indices of their vertices (see the documentation of Abstract_simplicial_chain_complex for examples).
Public Types | |
| typedef std::vector< size_t > | Simplex_data |
| Type of simplices representation. | |
| typedef Simplex_data::const_iterator | const_iterator |
| Constant iterator over the vertices of a simplex. | |
Public Member Functions | |
| Simplex (const Simplex_data &vertices, bool sort_data=false) | |
| Constructor from a vector of vertex indices. | |
| const_iterator | cbegin () |
| Returning a constant iterator on the first vertex of the simplex. | |
| const_iterator | cend () |
| Returning a constant past-the-end iterator of the simplex. | |
| int | dimension () const |
| Returns the dimension of a simplex. | |
| std::vector< Simplex > | boundary () const |
| Returns the boundary of a simplex. | |
| const Simplex_data & | vertices () const |
| Gets the set of vertex indices of the simplex. | |
| bool | operator< (const Simplex &other) const |
| Comparison operator. | |
| bool | operator== (const Simplex &other) const |
| Equality operator. | |
Friends | |
| template<typename _CoefficientType > | |
| class | Abstract_simplicial_chain_complex |
| std::ostream & | operator<< (std::ostream &out, const Simplex &simplex) |
| Outputs a simplex. | |
| typedef std::vector<size_t> CGAL::Homological_discrete_vector_field::Simplex::Simplex_data |
Type of simplices representation.
Simplices are stored as a sorted vector of vertex indices (a simplex of dimension \(q\) has \(q+1\) vertices and the vector must be sorted).
| CGAL::Homological_discrete_vector_field::Simplex::Simplex | ( | const Simplex_data & | vertices, |
| bool | sort_data = false |
||
| ) |
Constructor from a vector of vertex indices.
| vertices | Vector of the simplex vertex indices (a simplex of dimension \(q\) has \(q+1\) vertices and the vector must be sorted). |
| sort_data | If true vectors of vertex indices are sorted, if false indices are assumed to be sorted (faster). |
| std::vector< Simplex > CGAL::Homological_discrete_vector_field::Simplex::boundary | ( | ) | const |
Returns the boundary of a simplex.
The method returns the vector of the simplices in the boundary of the object.
| int CGAL::Homological_discrete_vector_field::Simplex::dimension | ( | ) | const |
Returns the dimension of a simplex.
A simplex of dimension \(q\) has \(q+1\) vertices.
| bool CGAL::Homological_discrete_vector_field::Simplex::operator< | ( | const Simplex & | other | ) | const |
Comparison operator.
Compare the object with another simplex according to the lexicographical order on vertex indices sets.
| other | Compare this with other (returns this < other). |
| bool CGAL::Homological_discrete_vector_field::Simplex::operator== | ( | const Simplex & | other | ) | const |
Equality operator.
As vertex indices must be store in increasing order, comparison just comes to compare the ordered vector of indices.