CGAL 6.1 - Homological Discrete Vector Fields
Loading...
Searching...
No Matches
CGAL::HDVF::Filtration_lower_star< CoefficientType, ComplexType, DegreeType > Class Template Reference

#include <CGAL/HDVF/Filtration_lower_star.h>

Inherits from

CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >.

Definition

template<typename CoefficientType, typename ComplexType, typename DegreeType>
class CGAL::HDVF::Filtration_lower_star< CoefficientType, ComplexType, DegreeType >

The class Filtration_lower_star implements the lower star filtration on a given complex implementing the concept AbstractChainComplex.

A filtration associated to a chain complex K associates to each cell of K a scalar value (called degree) such that the degree of a cell is larger than the degrees of its faces.

Let DegreeType be a scalar type. The lower star filtration is a filtration obtained from a map \(\mathrm{deg}\,:\, K_0 \to \mathrm{DegreeType}\) (where \(K_0\) denotes the set of vertices of \(K\)) associating a degree to each vertex of the complex \(K\).

The map is extended to cells of any dimension by setting, for a cell \(\sigma\):

\[\mathrm{deg}(\sigma) = \max_{\substack{v\in K_0\\v\text{ face of }\sigma}} \mathrm{deg}(v) \]

For geometric complexes, standard lower star filtrations are obtained by taking as a degree function the \(x\), \(y\) or \(z\) coordinate of vertices. The image below illustrates such a filtration ((left) lower star filtration with a \(z\) degree map on vertices, (right) lower star filtration with a \(y\) degree map on vertices).

The Filtration_lower_star class provides constructors taking as input:

  • either the vector of vertex degrees
  • or a function mapping each vertex to its degree.
Is model of
Filtration
Template Parameters
CoefficientTypea model of the Ring concept (ring used for homology computation).
ComplexTypea model of the AbstractChainComplex concept (type of the underlying chain complex).
DegreeTypethe scalar type of degrees.
Examples
HDVF/main_per_hdvf.cpp.

Public Member Functions

 Filtration_lower_star (const Filtration_lower_star &f)
 Copy constructor.
 
 Filtration_lower_star (const ComplexType &K, const std::vector< DegreeType > &deg)
 Constructor from vertex degrees.
 
 Filtration_lower_star (const ComplexType &K, std::function< DegreeType(size_t)> &deg_fun)
 Constructor from a function mapping vertices to degrees.
 
- Public Member Functions inherited from CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >
 Filtration_core (const ComplexType &K)
 Filtration_core default constructor.
 
 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.
 
 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 Member Functions

void star_filtration (const std::vector< DegreeType > &deg)
 Function building the filtration from the vector of vertices degrees.
 
void star_filtration (std::function< DegreeType(size_t)> &deg_fun)
 Function building the filtration from a function mapping vertices to their degree.
 
- Protected Member Functions inherited from CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >
void build_filtration_structure ()
 

Additional Inherited Members

- Public Types inherited from CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >
typedef std::pair< std::size_t, int > CellDim
 Type for indexing uniquely a cell.
 
- Protected Types inherited from CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >
typedef OSM::Sparse_matrix< CoefficientType, OSM::COLUMNCMatrix
 Type of column-major sparse matrices.
 
typedef OSM::Sparse_matrix< CoefficientType, OSM::ROWRMatrix
 Type of row-major sparse matrices.
 
typedef OSM::Sparse_chain< CoefficientType, OSM::COLUMNCChain
 Type of column-major chains.
 
typedef OSM::Sparse_chain< CoefficientType, OSM::ROWRChain
 Type of row-major chains.
 
- Protected Attributes inherited from CGAL::HDVF::Filtration_core< CoefficientType, ComplexType, DegreeType >
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.
 

Constructor & Destructor Documentation

◆ Filtration_lower_star() [1/3]

template<typename CoefficientType , typename ComplexType , typename DegreeType >
CGAL::HDVF::Filtration_lower_star< CoefficientType, ComplexType, DegreeType >::Filtration_lower_star ( const Filtration_lower_star< CoefficientType, ComplexType, DegreeType > &  f)

Copy constructor.

Builds a filtration by copy from another.

Parameters
[in]fAn initial lower star filtration.

◆ Filtration_lower_star() [2/3]

template<typename CoefficientType , typename ComplexType , typename DegreeType >
CGAL::HDVF::Filtration_lower_star< CoefficientType, ComplexType, DegreeType >::Filtration_lower_star ( const ComplexType &  K,
const std::vector< DegreeType > &  deg 
)

Constructor from vertex degrees.

The constructor computes all cells degrees as the minimum of the degrees of their vertices and sorts all the cells of the complex to fulfill the filtration ordering constraints.

Parameters
[in]KConstant reference to the underlying complex.
[in]degVector of vertex degrees.

◆ Filtration_lower_star() [3/3]

template<typename CoefficientType , typename ComplexType , typename DegreeType >
CGAL::HDVF::Filtration_lower_star< CoefficientType, ComplexType, DegreeType >::Filtration_lower_star ( const ComplexType &  K,
std::function< DegreeType(size_t)> &  deg_fun 
)

Constructor from a function mapping vertices to degrees.

The constructor computes all cells degrees as the minimum of the degrees of their vertices (obtained through deg_fun) and sorts all the cells of the complex to fulfill the filtration ordering constraints.

Parameters
[in]KConstant reference to the underlying complex.
[in]deg_funFunction mapping vertices of K to their degree.