|
CGAL 6.3-dev - Homological Discrete Vector Fields
|
#include <CGAL/HDVF/Cubical_chain_complex.h>
The class Cubical_chain_complex represents (topological) chain complexes associated to cubical complexes.
A cubical complex is a set of "square" cells such that: all the faces of a given cell also belong to the complex and any two cells intersect exactly along a common face (see the user manual of cubical chain complexes for more details).
GeometricChainComplex | CoefficientRing | a model of the IntegralDomainWithoutDivision concept. |
| Traits | a geometric traits class model of the HDVFTraits concept. |
| SparseMatrixStruct | a model of SparseMatrixStructure providing templates of sparse chains and sparse matrices built over a given model of SparseChain. |
Public Types | |
| enum | Cubical_complex_primal_dual |
| Type used to encode primal or dual construction. More... | |
| typedef CoefficientRing | Coefficient_ring |
| Type of coefficients used to compute homology. | |
| typedef Sparse_chain_type< Coefficient_ring, CGAL::OSM::COLUMN > | Column_chain |
| Type of column-major chains. | |
| typedef Sparse_chain_type< CoefficientRing, CGAL::OSM::ROW > | Row_chain |
| Type of row-major chains. | |
| typedef Sparse_matrix_type< CoefficientRing, CGAL::OSM::COLUMN > | Column_matrix |
| Type of column-major sparse matrices. | |
Public Member Functions | |
| Cubical_chain_complex () | |
| Default constructor (empty cubical complex). | |
| Cubical_chain_complex (const Cub_object_io< Traits > &cub, Cubical_complex_primal_dual type) | |
| Constructor from a Cub_object_io (builds PRIMAL or DUAL associated complex depending on type). | |
| bool | is_valid_cell (const std::vector< size_t > &cell) const |
| Checks if a cell given in Khalimsky coordinates has the right dimension. | |
| bool | is_valid_cell (size_t i) const |
| Checks if an index belongs to the range of the Boolean vector encoding the complex. | |
| Cubical_chain_complex & | operator= (const Cubical_chain_complex &complex) |
| Assignment. | |
| std::vector< size_t > | size_bb () const |
| Get the size of the Khalimsky bounding box. | |
| size_t | size () const |
| Returns the total size of the complex (size of its boolean vector representation). | |
| std::vector< size_t > | index_to_cell (size_t i, int q) const |
| Returns Khalimsky coordinates of the cell of "basis index" i in dimension q. | |
| size_t | cell_to_index (const std::vector< size_t > &cell) const |
| Returns the "basis index" of a cell given by its Khalimsky coordinates. | |
| int | dimension (const std::vector< size_t > &cell) const |
| Returns the dimension of a cell (given in Khalimsky coordinates). | |
| std::vector< size_t > | bindex_to_cell (size_t i) const |
| Returns Khalimsky coordinates of the cell of Boolean index i. | |
| size_t | cell_to_bindex (const std::vector< size_t > &cell) const |
| Returns the Boolean index of a cell given by its Khalimsky coordinates. | |
| enum CGAL::Homological_discrete_vector_field::Cubical_chain_complex::Cubical_complex_primal_dual |
Type used to encode primal or dual construction.
Values can be either PRIMAL or DUAL.
| CGAL::Homological_discrete_vector_field::Cubical_chain_complex< CoefficientRing, Traits, SparseMatrixStruct >::Cubical_chain_complex | ( | const Cub_object_io< Traits > & | cub, |
| Cubical_complex_primal_dual | type ) |
Constructor from a Cub_object_io (builds PRIMAL or DUAL associated complex depending on type).
Builds the cubical complex associated to a a set of cells (vertices, edges, squares, cubes...), ie. performs the down closure of cells and set the boundary matrices in any dimension. Given a set of cells:

| cub | A Cub_object_io containing a set of "cubical" cells. |
| type | Type of construction used (PRIMAL or DUAL). |
| std::vector< size_t > CGAL::Homological_discrete_vector_field::Cubical_chain_complex< CoefficientRing, Traits, SparseMatrixStruct >::bindex_to_cell | ( | size_t | i | ) | const |
Returns Khalimsky coordinates of the cell of Boolean index i.
In Cubical_chain_complex, a cells of dimenson q, besides its index in the basis of \(q\)-cells, has an index in the vectorisation of the Khalimsky representation, called its "Boolean index" (see user manual for details).
| i | The "Boolean" index of a cell. |
| size_t CGAL::Homological_discrete_vector_field::Cubical_chain_complex< CoefficientRing, Traits, SparseMatrixStruct >::cell_to_bindex | ( | const std::vector< size_t > & | cell | ) | const |
Returns the Boolean index of a cell given by its Khalimsky coordinates.
In Cubical_chain_complex, a cells of dimenson q, besides its index in the basis of \(q\)-cells, has an index in the vectorisation of the Khalimsky representation, called its "Boolean index" (see user manual for details).
| cell | Khalimsky coordinates of a cell. |
| size_t CGAL::Homological_discrete_vector_field::Cubical_chain_complex< CoefficientRing, Traits, SparseMatrixStruct >::cell_to_index | ( | const std::vector< size_t > & | cell | ) | const |
Returns the "basis index" of a cell given by its Khalimsky coordinates.
In AbstractChainComplex, cells of dimenson q are identified by their index in the basis of \(q\)-cells together with their dimension. In the context of cubical complexes, this index is called "basis index" (to distinguish from its "Boolean index", see user manual for details).
| cell | Khalimsky coordinates of a cell (of dimension \(q\)). |
| int CGAL::Homological_discrete_vector_field::Cubical_chain_complex< CoefficientRing, Traits, SparseMatrixStruct >::dimension | ( | const std::vector< size_t > & | cell | ) | const |
Returns the dimension of a cell (given in Khalimsky coordinates).
| Cell_of_invalid_dimension | Raises a `std::invalid_argument` if the dimension of Khalimsky coordinates of the `cell` differs from the dimension of the complex. |
| std::vector< size_t > CGAL::Homological_discrete_vector_field::Cubical_chain_complex< CoefficientRing, Traits, SparseMatrixStruct >::index_to_cell | ( | size_t | i, |
| int | q ) const |
Returns Khalimsky coordinates of the cell of "basis index" i in dimension q.
In AbstractChainComplex, cells of dimenson q are identified by their index in the basis of \(q\)-cells together with their dimension. In the context of cubical complexes, this index is called "basis index" (to distinguish from its "Boolean index", see user manual for details).
| i | "basis index" of a cell. |
| q | dimension of the cell. |
| size_t CGAL::Homological_discrete_vector_field::Cubical_chain_complex< CoefficientRing, Traits, SparseMatrixStruct >::size | ( | ) | const |
Returns the total size of the complex (size of its boolean vector representation).
Khalimsky coordinates in dimension q are bounded above by size_bb().at(q); the size of the boolean vector representing the complex is the product of these sizes.
| std::vector< size_t > CGAL::Homological_discrete_vector_field::Cubical_chain_complex< CoefficientRing, Traits, SparseMatrixStruct >::size_bb | ( | ) | const |
Get the size of the Khalimsky bounding box.
The Khalimsky coordinate of a cell c in dimension q is strictly lesser than size_bb().at(q).