|
CGAL 6.1 - Homological Discrete Vector Fields
|
#include <CGAL/HDVF/Filtration_core.h>
Inherited by CGAL::HDVF::Filtration_lower_star< CoefficientType, ComplexType, DegreeType >.
The class Filtration_core implements data structures and methods required by the Filtration concept.
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:
In consequence, a filtration associated to a complex K:
K (each cell has a unique index along the filtration called time along the filtration) such that:The class Filtration_core provides elementary constructors and methods used in derived filtrations.
Filtration | CoefficientType | a model of the Ring concept (ring used for homology computation). |
| ComplexType | a model of the AbstractChainComplex concept (type of the underlying chain complex). |
| DegreeType | the scalar type of degrees. |
Classes | |
| struct | FiltrationIterValue |
| Type of value returned by the iterator. More... | |
| struct | iterator |
| Iterator over a filtration. More... | |
Public Types | |
| typedef std::pair< std::size_t, int > | CellDim |
| Type for indexing uniquely a cell. | |
Public Member Functions | |
| Filtration_core (const ComplexType &K) | |
| Filtration_core default constructor. | |
| Filtration_core (const ComplexType &K, const std::vector< CellDim > &filtration, const std::vector< DegreeType > °) | |
| Constructor from a vector of cells (ordering of cells) and an associated vector of degrees. | |
| Filtration_core (const Filtration_core &f) | |
| Constructor by copy. | |
| iterator | begin () |
| Iterator to the beginning of the filtration. | |
| iterator | end () |
| Iterator to the ending of the filtration. | |
| std::size_t | get_filtration_size () const |
| Gets the filtration size. | |
| CellDim | get_cell_dim (std::size_t i) const |
Gets the cell (that is cell index and dimension) at the index i of the filtration. | |
| DegreeType | get_degree (std::size_t i) const |
Gets the degree of the ith element of the filtration. | |
| vector< vector< std::size_t > > | export_filtration () const |
| Exports the filtration time indices. | |
| bool | is_valid_filtration () const |
| Checks if a filtration is valid. | |
Protected Types | |
| typedef OSM::Sparse_matrix< CoefficientType, OSM::COLUMN > | CMatrix |
| Type of column-major sparse matrices. | |
| typedef OSM::Sparse_matrix< CoefficientType, OSM::ROW > | RMatrix |
| Type of row-major sparse matrices. | |
| typedef OSM::Sparse_chain< CoefficientType, OSM::COLUMN > | CChain |
| Type of column-major chains. | |
| typedef OSM::Sparse_chain< CoefficientType, OSM::ROW > | RChain |
| Type of row-major chains. | |
Protected Member Functions | |
| void | build_filtration_structure () |
Protected Attributes | |
| const ComplexType & | _K |
| Constant reference to the underlying chain complex. | |
| std::vector< CellDim > | _filtration |
| Vector of cells of the filtration (full ordering of cells). | |
| std::vector< DegreeType > | _deg |
| Vector of degrees of cells along the filtration. | |
| std::map< CellDim, std::size_t > | _cell_to_t |
| Map from cells to their index in the filtration. | |
Friends | |
| template<typename CoefT , typename ComplexT , typename DegT , typename FiltrT > | |
| class | Hdvf_persistence |
| std::ostream & | operator<< (std::ostream &out, const Filtration_core &f) |
Overload of the <<operator for filtrations. | |
| typedef std::pair<std::size_t, int> CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >::CellDim |
Type for indexing uniquely a cell.
| CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >::Filtration_core | ( | const ComplexType & | K | ) |
Filtration_core default constructor.
Builds an "empty" filtration with K as underlying chain complex.
| [in] | K | A chain complex (a model of AbstractChainComplex), the underlying chain complex of the filtration. |
| CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >::Filtration_core | ( | const ComplexType & | K, |
| const std::vector< CellDim > & | filtration, | ||
| const std::vector< DegreeType > & | deg | ||
| ) |
Constructor from a vector of cells (ordering of cells) and an associated vector of degrees.
The constructor check that the filtration is valid (a cell is introduced in the filtration after its faces and the degree vector is increasing) and throw an exception if not.
| [in] | K | A chain complex (a model of AbstractChainComplex), the underlying chain complex of the filtration. |
| [in] | filtration | An ordering of the cells of K encoded as a vector of its cells. |
| [in] | deg | The (increasing) vector of cells degrees. |
| CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >::Filtration_core | ( | const Filtration_core< CoefficientType, ComplexType, DegreeType > & | f | ) |
Constructor by copy.
Builds a Filtration_core by copy from another.
| [in] | f | An initial Filtration_core. |
| iterator CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >::begin | ( | ) |
Iterator to the beginning of the filtration.
| iterator CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >::end | ( | ) |
Iterator to the ending of the filtration.
| vector< vector< std::size_t > > CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >::export_filtration | ( | ) | const |
Exports the filtration time indices.
The method exports the time index of every cells in each dimension.
| bool CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >::is_valid_filtration |
Checks if a filtration is valid.
Checks that cells are ordered in increasing degrees and all cells have indices larger than their faces.
true if the filtration is valid, false otherwise