|
CGAL 6.3-dev - Homological Discrete Vector Fields
|
The concept AbstractChainComplex describes the requirements for (topological) chain complexes associated to abstract complexes used in the concept HDVF.
It provides methods to:
Cells are indexed along each dimension and thus identified by their index together with their dimension.
Types | |
| typedef unspecified_type | Coefficient_ring |
| Type of coefficients ring used to compute homology, model of IntegralDomainWithoutDivision. | |
| typedef unspecified_type | Sparse_matrix_structure |
| Type of structure of sparse matrix used. | |
| typedef Sparse_matrix_structure::template Sparse_chain_type< Coefficient_ring, CGAL::OSM::COLUMN > | Column_chain |
| Type of column-major chains (returned by the boundary operator). | |
| typedef Sparse_matrix_structure::template Sparse_chain_type< Coefficient_ring, CGAL::OSM::ROW > | Row_chain |
| Type of row-major chains (returned by the co-boundary operator). | |
| typedef Sparse_matrix_structure::template Sparse_matrix_type< Coefficient_ring, CGAL::OSM::COLUMN > | Column_matrix |
| Type of column-major sparse matrices (used to store the boundary operator). | |
Access functions | |
| int | dimension () |
| Returns the dimension of the complex. | |
| size_t | id () const |
| Get (unique) object Id. | |
| size_t | number_of_cells (int q) |
| Returns the number of cells in a given dimension. | |
| const vector< Column_matrix > & | boundary_matrices () const |
| Returns a constant reference to the vector of boundary matrices (along each dimension). | |
| const Column_matrix & | boundary_matrix (int q) const |
| Returns a constant reference over the boundary matrix of dimension q (i.e. column-major matrix of \(\partial_q\)). | |
| Column_chain | d (size_t id_cell, int q) |
| Returns the boundary of the cell id_cell in dimension q. | |
| Row_chain | cod (size_t id_cell, int q) |
| Returns the co-boundary of the cell id_cell in dimension q. | |
| std::vector< size_t > | bottom_faces (size_t id_cell, int q) const |
| Returns the vertices of a given cell (that is, the indices of its faces of dimension 0). | |
| template<typename CoefficientR, int StorageF> | |
| Column_chain | cofaces_chain (SparseChain< CoefficientR, StorageF > chain, int q) const |
| Returns the cofaces of a given chain in dimension q. | |
Input, output | |
| std::ostream & | operator<< (std::ostream &out, const AbstractChainComplex &complex) const |
| Inserts the chain complex in text mode in the stream. | |
Type of structure of sparse matrix used.
A model of SparseMatrixStructure providing a model of SparseChain and an associated model of SparseMatrix.
| const vector< Column_matrix > & AbstractChainComplex::boundary_matrices | ( | ) | const |
Returns a constant reference to the vector of boundary matrices (along each dimension).
The q-th element of this vector is a column-major sparse matrix containing the boundaries of q-cells (i.e. rows encode q-1 cells and columns q cells).
| const Column_matrix & AbstractChainComplex::boundary_matrix | ( | int | q | ) | const |
Returns a constant reference over the boundary matrix of dimension q (i.e. column-major matrix of \(\partial_q\)).
It is a column-major sparse matrix containing the boundaries of q-cells (i.e. rows encode q-1 cells and columns q cells).
| q | Dimension of the boundary matrix (i.e. columns will contain the boundary of dimension q cells). |
| Row_chain AbstractChainComplex::cod | ( | size_t | id_cell, |
| int | q ) |
Returns the co-boundary of the cell id_cell in dimension q.
This chain is actually a row of the boundary matrix in dimension q.
| id_cell | Index of the cell. |
| q | Dimension of the cell. |
| Column_chain AbstractChainComplex::cofaces_chain | ( | SparseChain< CoefficientR, StorageF > | chain, |
| int | q ) const |
Returns the cofaces of a given chain in dimension q.
The resulting chain, whatever the storage format of the input, is column-major, lies in dimension q+1 and is null if this dimension exceeds the dimension of the complex.
| CoefficientR | CoefficientRing of the chain. |
| StorageF | StorageFormat of the chain. |
| Column_chain AbstractChainComplex::d | ( | size_t | id_cell, |
| int | q ) |
Returns the boundary of the cell id_cell in dimension q.
| id_cell | Index of the cell. |
| q | Dimension of the cell. |
| int AbstractChainComplex::dimension | ( | ) |
Returns the dimension of the complex.
This dimension is the largest dimension of cells.
| size_t AbstractChainComplex::id | ( | ) | const |
Get (unique) object Id.
For comparison of constant references to the complex.
| size_t AbstractChainComplex::number_of_cells | ( | int | q | ) |
|
friend |
Inserts the chain complex in text mode in the stream.
Displays the number of cells in each dimension and the boundary matrix in each dimension.
| out | The output stream. |
| complex | Constant reference over the complex considered. |