CGAL 6.3-dev - Homological Discrete Vector Fields
Loading...
Searching...
No Matches

Definition

The concept Filtration describes the requirements for persistent filtrations associated to persistent homology computation.

By definition, a filtration over a chain complex K is a sequence of sub complexes \(\{K_t\,;\, t\in[d_1, \ldots, d_N]\}\), where \(d_i\) are scalars, such that:

  • \(\forall d\leqslant d'\), \(K_d\subseteq K_{d'}\).
  • \(|K_{d_{i+1}}| = |K_{d_{i}}|+1\).
  • As a consequence, any cell \(\sigma\in K\), is "added" at a given time \(i\) and the corresponding \(d_i\) is called its degree (denoted by \(\mathrm{deg}(\sigma)\)).
  • \(K_{d_1}\) is an empty complex.
  • \(K_{d_N} = K\).
  • For any cell \(\sigma\in K\), if \(\tau\) is a proper face of \(\sigma\), then \(\mathrm{deg}(\tau)\leqslant \mathrm{deg}(\sigma)\).

Hence a filtration is associated to an AbstractChainComplex. Each cell is equipped with a scalar value (called its degree) and the filtration is an enumeration of cells in any dimension by increasing degrees.

In consequence, a filtration associated to a complex K:

  • maps each cell to a scalar called its degree
  • orders the cells of K (each cell has a unique index along the filtration called time along the filtration) such that:
  • the index of a cell is larger that the indices of its faces,
  • the degree map is increasing along the filtration.

Let us remind that in all AbstractChainComplex, cells are indexed along each dimension and thus identified by their index together with their dimension.

Has models
CGAL::Homological_discrete_vector_field::Filtration_core<ChainComplex,Degree>
CGAL::Homological_discrete_vector_field::Filtration_lower_star<ChainComplex,Degree>
Examples
HDVF/main_per_hdvf.cpp.

Concepts

struct  Filtration_iter_value
 Value type of the filtration iterator. More...
struct  iterator
 The iterator over filtration. More...

Types

typedef unspecified_type Chain_complex
 Type of the underlying complex (a model of AbstractChainComplex).
typedef unspecified_type Degree
 (Scalar) type of degrees (model of RealEmbeddable).
typedef Complex::Coefficient_ring Coefficient_ring
 Type of coefficients used to compute homology .
typedef std::pair< size_t, int > Cell
 Type for indexing uniquely a cell.

Iterator

iterator begin ()
 Iterator to the beginning of the filtration.
iterator end ()
 Iterator past-the-end of the filtration.

Getters and tests

size_t size () const
 Gets the filtration size.
Cell cell (size_t i) const
 Gets the cell (that is cell index and dimension) at the index i of the filtration.
Degree degree (size_t i) const
 Gets the degree of the ith element of the filtration.
bool is_valid () const
 Checks that a filtration is valid.
bool operator== (const Filtration_core &f) const
 Comparison operator.

Input, output

vector< vector< size_t > > export_filtration () const
 Exports the filtration time indices.
std::istream & operator>> (std::istream &in, Filtration &f)
 Extracts a filtration from a stream.
std::ostream & operator<< (std::ostream &out, const Filtration &f)
 Inserts a filtration into a stream.

Member Typedef Documentation

◆ Cell

typedef std::pair<size_t, int> Filtration::Cell

Type for indexing uniquely a cell.

As stated in AbstractChainComplex, cells are identified by their dimension, together with their index along this dimension. The type Cell stores this pair:

  • First element of the pair: index of the cell.
  • Second element of the pair: dimension of the cell.

Member Function Documentation

◆ begin()

iterator Filtration::begin ( )

Iterator to the beginning of the filtration.

Returns
The iterator to the beginning of the filtration.

◆ end()

iterator Filtration::end ( )

Iterator past-the-end of the filtration.

Returns
The iterator past-the-end of the filtration.

◆ export_filtration()

vector< vector< size_t > > Filtration::export_filtration ( ) const

Exports the filtration time indices.

The method exports the time index of every cells in each dimension.

Returns
A vector containing, for each dimension, the vector of labels by cell index.

◆ is_valid()

bool Filtration::is_valid ( ) const

Checks that a filtration is valid.

Checks that cells are ordered in increasing degrees and all cells have indices larger than their faces.

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const Filtration & f )
friend

Inserts a filtration into a stream.

The filtration is encoded using the simple FILTR file format (see secHDVFfiltr_file_format "user manual" for details).

◆ operator>>

std::istream & operator>> ( std::istream & in,
Filtration & f )
friend

Extracts a filtration from a stream.

The filtration is encoded using the simple FILTR file format (see secHDVFfiltr_file_format "user manual" for details).