|
CGAL 6.1 - Homological Discrete Vector Fields
|
The concept AbstractChainComplex describes the requirements for (topological) chain complexes associated to abstract complexes used in the concept CGAL::HDVF.
It provides methods to:
Cells are indexed along each dimension and thus identified by their index together with their dimension.
Operators | |
| AbstractChainComplex & | operator= (const AbstractChainComplex &complex) |
| Affectation operator. | |
Access functions | |
| int | dim () |
| Returns the dimension of the complex, that is, the largest dimension of cells. | |
| size_t | nb_cells (int q) |
Returns the number of cells of dimension q. | |
| const vector< CMatrix > & | get_bnd_matrices () const |
| Returns all boundary matrices. | |
| const CMatrix & | get_bnd_matrix (int q) const |
Returns the boundary matrix of dimension q (ie. | |
| CChain | d (size_t id_cell, int q) |
Returns the boundary of the cell of index id_cell in dimension q. | |
| RChain | cod (size_t id_cell, int q) |
Returns the co-boundary of the cell of index 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 CoefficientT , int ChainTypeF> | |
| CChain | cofaces_chain (SparseChain< CoefficientT, ChainTypeF > chain, int q) const |
Returns the cofaces of a given chain in dimension q. | |
Output functions | |
| std::ostream & | print_complex (std::ostream &out=std::cout) const |
| Outputs the chain complex in text mode. | |
| RChain AbstractChainComplex::cod | ( | size_t | id_cell, |
| int | q | ||
| ) |
Returns the co-boundary of the cell of index id_cell in dimension q.
This boundary is a finite linear combination of cells of dimension q+1. It is encoded as a row-major chain (which maps each cell with a non-zero coefficient to this coefficient). This co-boundary is thus the id_cell-th row of the boundary matrix in dimension q+1.
| CChain AbstractChainComplex::cofaces_chain | ( | SparseChain< CoefficientT, ChainTypeF > | chain, |
| int | q | ||
| ) | const |
Returns the cofaces of a given chain in dimension q.
The resulting chain lies in dimension q+1 and is null if this dimension exceeds the dimension of the complex.
| CChain AbstractChainComplex::d | ( | size_t | id_cell, |
| int | q | ||
| ) |
Returns the boundary of the cell of index id_cell in dimension q.
This boundary is a finite linear combination of cells of dimension q-1. It is encoded as a column-major chain (which maps each cell with a non-zero coefficient to this coefficient). This boundary is thus the id_cell-th column of the boundary matrix in dimension q.
| const vector< CMatrix > & AbstractChainComplex::get_bnd_matrices | ( | ) | const |
Returns all boundary matrices.
The function returns constant reference to a vector of column-major sparse matrices. The q-th element of this vector is the matrix of \(\partial_q\), which gives the boundary of cells of dimension q(as a linear combination of q-1 cells).
| const CMatrix & AbstractChainComplex::get_bnd_matrix | ( | int | q | ) | const |
Returns the boundary matrix of dimension q (ie.
the matrix of \(\partial_q}\)).
The function returns a column-major sparse matrices.
| size_t AbstractChainComplex::nb_cells | ( | int | q | ) |
Returns the number of cells of dimension q.
If q is negative of larger than the dimension of the complex, returns 0.
| AbstractChainComplex & AbstractChainComplex::operator= | ( | const AbstractChainComplex & | complex | ) |
Affectation operator.
The operator creates a "fresh" copy of complex.
| std::ostream & AbstractChainComplex::print_complex | ( | std::ostream & | out = std::cout | ) | const |
Outputs the chain complex in text mode.
By default, outputs the complex to std::cout.