CGAL 6.2 - Homological Discrete Vector Fields
Loading...
Searching...
No Matches
AbstractChainComplex Concept Reference

Definition

The concept AbstractChainComplex describes the requirements for (topological) chain complexes associated to abstract complexes used in the concept HDVF.

It provides methods to:

  • get the dimension of the complex, the number of cells in each dimension
  • get the boundary and co-boundary of cell(s)
  • get the vertices of a given cell
  • output the complex in text format

Cells are indexed along each dimension and thus identified by their index together with their dimension.

Has models
CGAL::Homological_discrete_vector_field::Abstract_simplicial_chain_complex<IntegralDomainWithoutDivision>
CGAL::Homological_discrete_vector_field::Sub_chain_complex_mask<IntegralDomainWithoutDivision, AbstractChainComplex>

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &out, const AbstractChainComplex &complex) const
 Inserts the chain complex in text mode in the stream.
 

Types

typedef CoefficientRing Coefficient_ring
 Type of coefficients ring used to compute homology, model of IntegralDomainWithoutDivision
 
typedef CGAL::OSM::Sparse_chain< CoefficientRing, CGAL::OSM::COLUMNColumn_chain
 Type of column-major chains (returned by the boundary operator)
 
typedef CGAL::OSM::Sparse_chain< CoefficientRing, CGAL::OSM::ROWRow_chain
 Type of row-major chains (returned by the co-boundary operator)
 
typedef CGAL::OSM::Sparse_matrix< CoefficientRing, CGAL::OSM::COLUMNColumn_matrix
 Type of column-major sparse matrices (used to store the boundary operator)
 

Operators

AbstractChainComplexoperator= (const AbstractChainComplex &complex)
 Assignment operator.
 

Access functions

int dimension ()
 Returns the dimension of the complex, that is, the largest dimension of cells.
 
size_t number_of_cells (int q)
 Returns the number of cells of dimension q.
 
const vector< Column_matrix > & boundary_matrices () const
 Returns all boundary matrices.
 
const Column_matrixboundary_matrix (int q) const
 Returns the boundary matrix of dimension q (ie. the matrix of \(\partial_q\)).
 
Column_chain d (size_t id_cell, int q)
 Returns the boundary of the cell of index id_cell in dimension q.
 
Row_chain 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 CoefficientR , int StorageF>
Column_chain cofaces_chain (SparseChain< CoefficientR, StorageF > chain, int q) const
 Returns the cofaces of a given chain in dimension q.
 

Member Typedef Documentation

◆ Coefficient_ring

typedef CoefficientRing AbstractChainComplex::Coefficient_ring

Type of coefficients ring used to compute homology, model of IntegralDomainWithoutDivision

Member Function Documentation

◆ boundary_matrices()

const vector< Column_matrix > & AbstractChainComplex::boundary_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).

◆ boundary_matrix()

const Column_matrix & AbstractChainComplex::boundary_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.

◆ cod()

Row_chain 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.

◆ cofaces_chain()

template<typename CoefficientR , int StorageF>
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.

Template Parameters
CoefficientRCoefficientRing of the chain.
StorageFStorageFormat of the chain.

◆ d()

Column_chain 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.

◆ number_of_cells()

size_t AbstractChainComplex::number_of_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.

◆ operator=()

AbstractChainComplex & AbstractChainComplex::operator= ( const AbstractChainComplex complex)

Assignment operator.

The operator creates a copy of complex.