|
CGAL 6.3-dev - Homological Discrete Vector Fields
|
#include <CGAL/HDVF/Hdvf.h>
CGAL::Homological_discrete_vector_field::Hdvf_core< ChainComplex >.
The class Hdvf implements homology and cohomology computation via homological discrete vector fields (HDVF for short).
It derives from Hdvf_core and shares all its data and methods.
Perfect HDVFs provide various topological results:
Figure 99.1 Illustration of cycles annotation and comparison. Left: Generator \(g(\sigma)\) associated to the critical cell \(\sigma\); Middle: A cycle \(\alpha\) ; Right: A second cycle \(\beta\).
For \(\mathbb Z_2\) homology, the annotation of \(\alpha\) is \(\sigma\) ( \(\alpha\) equals \(g(\sigma)\) up to a boundary), while the annotation of \(\beta\) is \(\sigma+\tau+\gamma\) ( \(\beta\) equals \(g(\sigma)+g(\tau)+g(\gamma)\) up to a boundary).
Therefore, are_same_cycles will return true for \(\alpha\) and \(g(\sigma)\), but false for \(\beta\) and \(g(\sigma)\).
Besides construction operations and methods (using the A() operation), the Hdvf class implements four other HDVF operations: R, M, W and MW together with appropriate find_pair_xxx() functions (see user documentation for more details).
HDVF | ChainComplex | a model of the AbstractChainComplex concept, providing the type of abstract chain complex used. |
Classes | |
| struct | Hole_information |
| Hole information returned by iterator. More... | |
| struct | iterator |
| Iterator over homology/cohomology generators. More... | |
Public Types | |
| typedef ChainComplex | Chain_complex |
| Chain complex type. | |
| typedef Chain_complex::Coefficient_ring | Coefficient_ring |
| Type of coefficients used to compute homology. | |
| typedef Hdvf_core< Chain_complex > | Base |
| Type of parent Hdvf_core class. | |
| Public Types inherited from CGAL::Homological_discrete_vector_field::Hdvf_core< ChainComplex > | |
| typedef ChainComplex | Chain_complex |
| Type of the underlying chain complex. | |
| typedef ChainComplex::Coefficient_ring | Coefficient_ring |
| Type of coefficients used to compute homology. | |
| typedef ChainComplex::Sparse_matrix_structure | Sparse_matrix_structure |
| Type of sparse matrix structure used to compute homology. | |
| template<typename CR, int SF> | |
| using | Sparse_chain_base = typename Sparse_matrix_structure::template Sparse_chain_type<CR, SF> |
| Template type of underlying sparse chains. | |
| template<typename CR, int SF> | |
| using | Sparse_matrix_base = typename Sparse_matrix_structure::template Sparse_matrix_type<CR, SF> |
| Template type of underlying sparse matrices. | |
| typedef Sparse_chain_base< Coefficient_ring, CGAL::OSM::COLUMN > | Column_chain |
| Type of column-major chains. | |
| typedef Sparse_chain_base< Coefficient_ring, CGAL::OSM::ROW > | Row_chain |
| Type of row-major chains. | |
| typedef Sparse_matrix_base< Coefficient_ring, CGAL::OSM::COLUMN > | Column_matrix |
| Type of column-major sparse matrices. | |
| typedef Sparse_matrix_base< Coefficient_ring, CGAL::OSM::ROW > | Row_matrix |
| Type of row-major sparse matrices. | |
Public Member Functions | |
| Hdvf (const Chain_complex &K, int hdvf_opt=OPT_FULL, int dimension_restriction=-1) | |
| Builds an "empty" HDVF associated to K (with all cells critical). | |
| Hdvf & | operator= (const Hdvf &hdvf) |
| Affectation operator. | |
| Hdvf (const ChainComplex &K, const std::vector< std::vector< PSC_flag > > &flags, bool with_build_reduction=false, int hdvf_opt=OPT_FULL, int dimension_restriction=-1) | |
| Constructor from the PRIMARY/SECONDARY/CRITICAL labels. | |
| bool | is_valid_pair_for_M (size_t pi, size_t gamma, int q) |
| Checks if the pair of cells \((\pi, \gamma)\), of dimension q, is valid for M. | |
| Cell_pair | find_pair_M (int q, bool &found) const |
| Finds a valid Cell_pair of dimension q for M. | |
| Cell_pair | find_pair_M (int q, bool &found, size_t tau) const |
| Finds a valid Cell_pair of dimension q for M cointaining tau. | |
| std::vector< Cell_pair > | find_pairs_M (int q, bool &found) const |
| Finds all valid Cell_pair of dimension q for M. | |
| std::vector< Cell_pair > | find_pairs_M (int q, bool &found, size_t tau) const |
| Finds all valid Cell_pair of dimension q for M cointaining tau. | |
| bool | is_valid_pair_for_W (size_t sigma, size_t gamma, int q) |
| Checks if the pair of cells \((\sigma, \gamma)\), of dimension q, is valid for W. | |
| Cell_pair | find_pair_W (int q, bool &found) const |
| Finds a valid Cell_pair of dimension q for W. | |
| Cell_pair | find_pair_W (int q, bool &found, size_t tau) const |
| Finds a valid Cell_pair of dimension q for W cointaining tau. | |
| std::vector< Cell_pair > | find_pairs_W (int q, bool &found) const |
| Finds all valid Cell_pair of dimension q for W. | |
| std::vector< Cell_pair > | find_pairs_W (int q, bool &found, size_t tau) const |
| Finds all valid Cell_pair of dimension q for W cointaining tau. | |
| bool | is_valid_pair_for_MW (size_t pi, size_t sigma, int q) |
| Checks if the pair of cells \((\pi, \sigma)\), of dimension q, is valid for MW. | |
| Cell_pair | find_pair_MW (int q, bool &found) const |
| Finds a valid Cell_pair of dimension q for MW. | |
| Cell_pair | find_pair_MW (int q, bool &found, size_t tau) const |
| Finds a valid Cell_pair of dimension q for MW cointaining tau. | |
| std::vector< Cell_pair > | find_pairs_MW (int q, bool &found) const |
| Finds all valid Cell_pair of dimension q for MW. | |
| std::vector< Cell_pair > | find_pairs_MW (int q, bool &found, size_t tau) const |
| Finds all valid Cell_pair of dimension q for W cointaining tau. | |
| bool | is_valid_pair_for_R (size_t pi, size_t sigma, int q) |
| Checks if the pair of cells \((\pi, \sigma)\), of dimensions q / q+1, is valid for R. | |
| void | R (size_t pi, size_t sigma, int q) |
| R operation (cancels a A operation). | |
| void | R (const Cell_pair &p) |
| R operation (cancels a A operation). | |
| void | M (size_t pi, size_t gamma, int q) |
| M operation. | |
| void | M (const Cell_pair &p) |
| M operation. | |
| void | W (size_t sigma, size_t gamma, int q) |
| W operation. | |
| void | W (const Cell_pair &p) |
| W operation. | |
| void | MW (size_t pi, size_t sigma, int q) |
| MW operation. | |
| void | MW (const Cell_pair &p) |
| MW operation. | |
| Column_chain | z (size_t sigma, int q) |
| Compute \(z_q\) function on a cell of dimension q. | |
| Column_chain | co_z (size_t sigma, int q) |
| Compute \(z^q\) function on a cell of dimension q. | |
| Column_chain | hd (size_t sigma, int q) |
| Computes \(h_{q-1}\circ \partial_q(\sigma)\). | |
| Coefficient_ring | hd (size_t sigma, size_t tau, int q) |
| Computes \(\langle h_{q-1}\circ \partial_q(\sigma), \tau\rangle\). | |
| Column_chain | dh (size_t sigma, int q) |
| Computes \(\partial_{q+1}\circ h_{q}(\sigma)\). | |
| Coefficient_ring | dh (size_t sigma, size_t tau, int q) |
| Computes \(\langle \partial_{q+1}\circ h_{q}(\sigma), \tau\rangle\). | |
| Column_chain | get_annotation (Column_chain chain, int dim) const |
| Gets the annotation of a cycle in the homology basis. | |
| Row_chain | get_coannotation (Row_chain chain, int dim) const |
| Gets the co-annotation of a co-cycle in the cohomology basis. | |
| bool | are_same_cycles (Column_chain chain1, Column_chain chain2, int dim) |
| Checks if two cycles belong to the same homology class. | |
| bool | are_same_cocycles (Row_chain chain1, Row_chain chain2, int dim) |
| Checks if two co-cycles belong to the same cohomology class. | |
| iterator | begin (int q=-1, Iterator_mode mode=Iterator_mode(0)) const |
| Iterator to the beginning of homology/cohomology generators. | |
| iterator | end () const |
| Iterator past-the-end of homology/cohomology generators. | |
| Public Member Functions inherited from CGAL::Homological_discrete_vector_field::Hdvf_core< ChainComplex > | |
| Hdvf_core (const ChainComplex &K, int hdvf_opt=OPT_FULL, int dimension_restriction=-1) | |
| Constructor from a chain complex. | |
| Hdvf_core (const Hdvf_core &hdvf) | |
| Copy constructor. | |
| Hdvf_core & | operator= (const Hdvf_core &hdvf) |
| Affectation operator. | |
| Hdvf_core (const ChainComplex &K, const std::vector< std::vector< PSC_flag > > &flags, bool with_build_reduction=false, int hdvf_opt=OPT_FULL, int dimension_restriction=-1) | |
| Constructor from the PRIMARY/SECONDARY/CRITICAL labels. | |
| PSC_flag | psc_flag (size_t tau, int q) const |
| Gets the PSC_flag of the cell tau in dimension q. | |
| CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::Hdvf | ( | const Chain_complex & | K, |
| int | hdvf_opt = OPT_FULL, | ||
| int | dimension_restriction = -1 ) |
Builds an "empty" HDVF associated to K (with all cells critical).
By default, the HDVF option is set to OPT_FULL (full reduction computed).
| K | A chain complex (a model of AbstractChainComplex) |
| hdvf_opt | Option for HDVF computation (OPT_BND, OPT_F, OPT_G or OPT_FULL) |
| dimension_restriction | Determines if perfect HDVFs are computed along any dimensions (if dimension_restriction is -1) or a single dimension (specified by dimension_restrictions) |
| If | the complex `K` is empty, raises a `std::runtime_error`. |
| CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::Hdvf | ( | const ChainComplex & | K, |
| const std::vector< std::vector< PSC_flag > > & | flags, | ||
| bool | with_build_reduction = false, | ||
| int | hdvf_opt = OPT_FULL, | ||
| int | dimension_restriction = -1 ) |
Constructor from the PRIMARY/SECONDARY/CRITICAL labels.
If with_build_reduction is false check the combinatorial coherence of labels. If with_build_reduction is true checks that labels describe a valid HDVF (ie. \(\partial(S)\_P\) is invertible).
| K | A chain complex (a model of AbstractChainComplex) |
| flags | Vector of PSC labels along each dimensions. |
| with_build_reduction | If false, loads labels without building the reduction, if true builds the reduction ( \(\mathscr O(n^3)\)). |
| hdvf_opt | Option for HDVF computation (OPT_BND, OPT_F, OPT_G or OPT_FULL) |
| dimension_restriction | Determines if perfect HDVFs are computed along any dimensions (if dimension_restriction is -1) or a single dimension (specified by dimension_restrictions) |
| Incoherent_flags | If the flags provided are incoherent (or do not define an HDVF), raises a `std::invalid_argument`. |
| bool CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::are_same_cocycles | ( | Row_chain | chain1, |
| Row_chain | chain2, | ||
| int | dim ) |
Checks if two co-cycles belong to the same cohomology class.
| chain1 | First co-cycle. |
| chain2 | Second co-cycle. |
| dim | Dimension of both co-cycles. |
| Invalid_argument | If `chain1` or `chain2` are not co-cycle, raises a `std::invalid_argument` exception. |
| bool CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::are_same_cycles | ( | Column_chain | chain1, |
| Column_chain | chain2, | ||
| int | dim ) |
Checks if two cycles belong to the same homology class.
| chain1 | First cycle. |
| chain2 | Second cycle. |
| dim | Dimension of both cycles. |
| Invalid_argument | If `chain1` or `chain2` are not cycles, raises a `std::invalid_argument` exception. |
| iterator CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::begin | ( | int | q = -1, |
| Iterator_mode | mode = Iterator_mode(0) ) const |
Iterator to the beginning of homology/cohomology generators.
| q | If positive, the iterator visits only holes of dimension q, if negative (default), visits holes in any dimension computed (depending on dimension restriction) |
| mode | Defines which information is returned by the iterator (HOMOLOGY, COHOMOLOGY or BOTH). This argument must be coherent with the HDVF option chosen for computation. By default, copies the current HDVF options. |
| Column_chain CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::co_z | ( | size_t | sigma, |
| int | q ) |
Compute \(z^q\) function on a cell of dimension q.
This function was first defined in tri-partitions; formally \(z^q = \mathrm{Id} - h_{q}^*\circ \partial_{q+1}^*\).
When the HDVF is perfect, \(z_q(\sigma)\) is the canonical cocycle associated to \(\sigma\). Intuitively:
Moreover, in HDVF_persistent, co_z function provides persistent cohomology generators.
| sigma | Cell index. |
| q | Cell dimension. |
| Column_chain CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::dh | ( | size_t | sigma, |
| int | q ) |
Computes \(\partial_{q+1}\circ h_{q}(\sigma)\).
The \(\partial_{q+1}\circ h_{q}(\sigma)\) function is used both in MW operation and in tri-partitions. As the matrix is not stored in the reduction, we provide methods to compute if efficiently.
| sigma | Index of the cell |
| q | Dimension of the cell |
| Coefficient_ring CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::dh | ( | size_t | sigma, |
| size_t | tau, | ||
| int | q ) |
Computes \(\langle \partial_{q+1}\circ h_{q}(\sigma), \tau\rangle\).
The \(\partial_{q+1}\circ h_{q}\) function is used both in MW operation and in tri-partitions. As the matrix is not stored in the reduction, we provide methods to compute if efficiently.
| iterator CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::end | ( | ) | const |
Iterator past-the-end of homology/cohomology generators.
| Cell_pair CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pair_M | ( | int | q, |
| bool & | found ) const |
Finds a valid Cell_pair of dimension q for M.
The function searches a pair of cells \((\pi, \gamma)\) with \(\pi\) PRIMARY and \(\gamma\) CRITICAL, valid for M (ie. such that \(\langle f(\pi), \gamma \rangle\) invertible). It returns the first valid pair found by iterators.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| Cell_pair CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pair_M | ( | int | q, |
| bool & | found, | ||
| size_t | tau ) const |
Finds a valid Cell_pair of dimension q for M cointaining tau.
The function searches a pair of cells \((\pi, \gamma)\) with \(\pi\) PRIMARY and \(\gamma\) CRITICAL (one of them is tau), valid for M (ie. such that \(\langle f(\pi), \gamma \rangle\) invertible). It returns the first valid pair found by iterators.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| tau | Cell of dimension q to pair. |
| Cell_pair CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pair_MW | ( | int | q, |
| bool & | found ) const |
Finds a valid Cell_pair of dimension q for MW.
The function searches a pair of cells \((\pi, \sigma)\) with \(\pi\) PRIMARY and \(\sigma\) SECONDARY, valid for MW (ie. such that \(\langle h_{q-1}\partial_q(\pi), \sigma \rangle\) invertible and \(\langle \partial_{q+1} h_q(\sigma), \pi \rangle\) invertible). It returns the first valid pair found by iterators.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| Cell_pair CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pair_MW | ( | int | q, |
| bool & | found, | ||
| size_t | tau ) const |
Finds a valid Cell_pair of dimension q for MW cointaining tau.
The function searches a pair of cells \((\pi, \sigma)\) with \(\pi\) PRIMARY and \(\sigma\) SECONDARY (one of them is tau), valid for MW (ie. such that \(\langle h_{q-1}\partial_q(\pi), \sigma \rangle\) invertible and \(\langle \partial_{q+1} h_q(\sigma), \pi \rangle\) invertible). It returns the first valid pair found by iterators.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| tau | Cell of dimension q to pair. |
| Cell_pair CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pair_W | ( | int | q, |
| bool & | found ) const |
Finds a valid Cell_pair of dimension q for W.
The function searches a pair of cells \((\sigma, \gamma)\) with \(\sigma\) SECONDARY and \(\gamma\) CRITICAL, valid for W (ie. such that \(\langle g(\gamma), \sigma \rangle\) invertible). It returns the first valid pair found by iterators.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| Cell_pair CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pair_W | ( | int | q, |
| bool & | found, | ||
| size_t | tau ) const |
Finds a valid Cell_pair of dimension q for W cointaining tau.
The function searches a pair of cells \((\sigma, \gamma)\) with \(\sigma\) SECONDARY and \(\gamma\) CRITICAL (one of them is tau), valid for W (ie. such that \(\langle g(\gamma), \sigma \rangle\) invertible). It returns the first valid pair found by iterators.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| tau | Cell of dimension q to pair. |
| std::vector< Cell_pair > CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pairs_M | ( | int | q, |
| bool & | found ) const |
Finds all valid Cell_pair of dimension q for M.
The function searches all pairs of cells \((\pi, \gamma)\) with \(\pi\) PRIMARY and \(\gamma\) CRITICAL, valid for M (ie. such that \(\langle f(\pi), \gamma \rangle\) invertible). It returns a vector of such pairs.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| std::vector< Cell_pair > CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pairs_M | ( | int | q, |
| bool & | found, | ||
| size_t | tau ) const |
Finds all valid Cell_pair of dimension q for M cointaining tau.
The function searches all pairs of cells \((\pi, \gamma)\) with \(\pi\) PRIMARY and \(\gamma\) CRITICAL (one of them is tau), valid for M (ie. such that \(\langle f(\pi), \gamma \rangle\) invertible). It returns a vector of such pairs.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| tau | Cell of dimension q to pair. |
| std::vector< Cell_pair > CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pairs_MW | ( | int | q, |
| bool & | found ) const |
Finds all valid Cell_pair of dimension q for MW.
The function searches all pairs of cells \((\pi, \sigma)\) with \(\pi\) PRIMARY and \(\sigma\) SECONDARY, valid for MW (ie. such that \(\langle h_{q-1}\partial_q(\pi), \sigma \rangle\) invertible and \(\langle \partial_{q+1} h_q(\sigma), \pi \rangle\) invertible). It returns a vector of such pairs.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| std::vector< Cell_pair > CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pairs_MW | ( | int | q, |
| bool & | found, | ||
| size_t | tau ) const |
Finds all valid Cell_pair of dimension q for W cointaining tau.
The function searches all pairs of cells \((\pi, \sigma)\) with \(\pi\) PRIMARY and \(\sigma\) SECONDARY (one of them is tau), valid for MW (ie. such that \(\langle h_{q-1}\partial_q(\pi), \sigma \rangle\) invertible and \(\langle \partial_{q+1} h_q(\sigma), \pi \rangle\) invertible). It returns a vector of such pairs.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| tau | Cell of dimension q to pair. |
| std::vector< Cell_pair > CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pairs_W | ( | int | q, |
| bool & | found ) const |
Finds all valid Cell_pair of dimension q for W.
The function searches all pairs of cells \((\sigma, \gamma)\) with \(\sigma\) SECONDARY and \(\gamma\) CRITICAL, valid for W (ie. such that \(\langle g(\gamma), \sigma \rangle\) invertible). It returns a vector of such pairs.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| std::vector< Cell_pair > CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::find_pairs_W | ( | int | q, |
| bool & | found, | ||
| size_t | tau ) const |
Finds all valid Cell_pair of dimension q for W cointaining tau.
The function searches all pairs of cells \((\sigma, \gamma)\) with \(\sigma\) SECONDARY and \(\gamma\) CRITICAL (one of them is tau), valid for W (ie. such that \(\langle g(\gamma), \sigma \rangle\) invertible). It returns the first valid pair found by iterators. It returns a vector of such pairs.
| q | Dimension of the pair searched. |
| found | Reference to a Boolean variable. The method sets found to true if a valid pair is found, false otherwise. |
| tau | Cell of dimension q to pair. |
| Column_chain CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::get_annotation | ( | Column_chain | chain, |
| int | dim ) const |
Gets the annotation of a cycle in the homology basis.
The method returns the image of a cycle by the morphism \(f\), that is, a linear combination of critical cells (corresponding to the decomposition of the cycle in the homology basis). If the annotation has a single non zero coefficient for a given critical cell \(\sigma\), then the cycle belongs to the class of the homology generator \(g(\sigma)\).
| chain | The cycle to annotate in the homology basis. |
| dim | Dimension of the cycle. |
| Invalid_argument | If the `chain` provided is not a cycle, raises a `std::invalid_argument` exception. |
| Row_chain CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::get_coannotation | ( | Row_chain | chain, |
| int | dim ) const |
Gets the co-annotation of a co-cycle in the cohomology basis.
The method returns the image of a co-cycle by the morphism \(g^*\), that is, a linear combination of critical cells (corresponding to the decomposition of the co-cycle in the cohomology basis). If the annotation has a single non zero coefficient for a given critical cell \(\sigma\), then the co-cycle belongs to the class of the cohomology generator \(f^*(\sigma)\).
| chain | The co-cycle to annotate in the homology basis. |
| dim | Dimension of the co-cycle. |
| Invalid_argument | If the `chain` provided is not a co-cycle, raises a `std::invalid_argument` exception. |
| Column_chain CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::hd | ( | size_t | sigma, |
| int | q ) |
Computes \(h_{q-1}\circ \partial_q(\sigma)\).
The \(h_{q-1}\circ \partial_q\) function is used both in MW operation and in tri-partitions. As the matrix is not stored in the reduction, we provide methods to compute if efficiently.
| sigma | Index of the cell |
| q | Dimension of the cell |
| Coefficient_ring CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::hd | ( | size_t | sigma, |
| size_t | tau, | ||
| int | q ) |
Computes \(\langle h_{q-1}\circ \partial_q(\sigma), \tau\rangle\).
The \(h_{q-1}\circ \partial_q\) function is used both in MW operation and in tri-partitions. As the matrix is not stored in the reduction, we provide methods to compute if efficiently.
| bool CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::is_valid_pair_for_M | ( | size_t | pi, |
| size_t | gamma, | ||
| int | q ) |
| bool CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::is_valid_pair_for_MW | ( | size_t | pi, |
| size_t | sigma, | ||
| int | q ) |
| bool CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::is_valid_pair_for_R | ( | size_t | pi, |
| size_t | sigma, | ||
| int | q ) |
| bool CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::is_valid_pair_for_W | ( | size_t | sigma, |
| size_t | gamma, | ||
| int | q ) |
| void CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::M | ( | const Cell_pair & | p | ) |
M operation.
A pair of cells \((\pi, \gamma)\) of dimension q, with \(\pi\) PRIMARY and \(\gamma\) CRITICAL, is valid for M if \(\langle f(\pi), \gamma \rangle\) is invertible. After the M operation, \(\pi\) becomes CRITICAL and \(\gamma\) become PRIMARY. The M method updates the reduction accordingly (in time \(\mathcal O(n^2)\)).
| p | Argument Cell_pair containing \(\pi\), \(\gamma\) and the dimension of the pair. |
| void CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::M | ( | size_t | pi, |
| size_t | gamma, | ||
| int | q ) |
M operation.
A pair of cells \((\pi, \gamma)\) of dimension q, with \(\pi\) PRIMARY and \(\gamma\) CRITICAL, is valid for M if \(\langle f(\pi), \gamma \rangle\) is invertible. After the M operation, \(\pi\) becomes CRITICAL and \(\gamma\) become PRIMARY. The M method updates the reduction accordingly (in time \(\mathcal O(n^2)\)).
| pi | First cell of the pair (dimension q) |
| gamma | Second cell of the pair (dimension q) |
| q | Dimension of the pair |
| Invalid_operation | If `q` is the dimension of the complex, `M`operation is not valid and the method raises a `std::runtime_error` exception. |
| Invalid_arguments | If \(\langle f(\pi), \gamma \rangle\) is not invertible, raises a `std::invalid_argument` exception. |
| Incorrect_hdvf_options | Operations can be computed only under HDVF_FULL options, raises a `std::runtime_error` exception otherwise. |
| void CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::MW | ( | const Cell_pair & | p | ) |
MW operation.
A pair of cells \((\pi, \sigma)\) of dimension q, with \(\pi\) PRIMARY and \(\sigma\) SECONDARY, is valid for MW if \(\langle h_{q-1}\partial_q(\pi), \sigma \rangle\) is invertible and \(\langle \partial_{q+1} h_q(\sigma), \pi \rangle\) is invertible. After the MW operation, \(\pi\) becomes SECONDARY and \(\sigma\) become PRIMARY. The MW method updates the reduction accordingly (in time \(\mathcal O(n^2)\)).
| p | Argument Cell_pair containing \(\pi\), \(\sigma\) and the dimension of the pair. |
| void CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::MW | ( | size_t | pi, |
| size_t | sigma, | ||
| int | q ) |
MW operation.
A pair of cells \((\pi, \sigma)\) of dimension q, with \(\pi\) PRIMARY and \(\sigma\) SECONDARY, is valid for MW if \(\langle h_{q-1}\partial_q(\pi), \sigma \rangle\) is invertible and \(\langle \partial_{q+1} h_q(\sigma), \pi \rangle\) is invertible. After the MW operation, \(\pi\) becomes SECONDARY and \(\sigma\) become PRIMARY. The MW method updates the reduction accordingly (in time \(\mathcal O(n^2)\)).
| pi | First cell of the pair (dimension q) |
| sigma | Second cell of the pair (dimension q) |
| q | Dimension of the pair |
| Invalid_operation | If `q` is 0 or the dimension of the complex, `MW`operation is not valid and the method raises a `std::runtime_error` exception. |
| Invalid_arguments | If \(\langle h_{q-1}\partial_q(\pi), \sigma \rangle\) or \(\langle \partial_{q+1} h_q(\sigma), \pi \rangle\) are not invertible, raises a `std::invalid argument` exception. |
| Incorrect_hdvf_options | Operations can be computed only under HDVF_FULL options, raises a `std::runtime_error` exception otherwise. |
| Hdvf & CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::operator= | ( | const Hdvf< ChainComplex > & | hdvf | ) |
Affectation operator.
| Invalid_underlying_complex | If `hdvf` does not share the same underlying complex, raises a `std::runtime_error`. |
| void CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::R | ( | const Cell_pair & | p | ) |
R operation (cancels a A operation).
A pair of cells \((\pi, \sigma)\) of respective dimension q and q+1, with \(\pi\) PRIMARY and \(\sigma\) SECONDARY, is valid for R if \(\langle h(\pi), \sigma \rangle\) is invertible. After the R operation, \(\pi\) and \(\sigma\) become CRITICAL. The R method updates the reduction accordingly (in time \(\mathcal O(n^2)\)).
| p | Argument Cell_pair containing \(\pi\), \(\sigma\) and the dimension of the pair. |
| void CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::R | ( | size_t | pi, |
| size_t | sigma, | ||
| int | q ) |
R operation (cancels a A operation).
A pair of cells \((\pi, \sigma)\) of respective dimension q and q+1, with \(\pi\) PRIMARY and \(\sigma\) SECONDARY, is valid for R if \(\langle h(\pi), \sigma \rangle\) is invertible. After the R operation, \(\pi\) and \(\sigma\) become CRITICAL. The R method updates the reduction accordingly (in time \(\mathcal O(n^2)\)).
| pi | First cell of the pair (dimension q) |
| sigma | Second cell of the pair (dimension q+1) |
| q | Dimension of the pair |
| Invalid_arguments | If \(\langle h(\pi), \sigma \rangle\) is not invertible, raises a `std::invalid_argument` exception. |
| Incorrect_hdvf_options | Operations can be computed only under HDVF_FULL options, raises a `std::runtime_error` exception otherwise. |
| void CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::W | ( | const Cell_pair & | p | ) |
W operation.
A pair of cells \((\sigma, \gamma)\) of dimension q, with \(\sigma\) SECONDARY and \(\gamma\) CRITICAL, is valid for W if \(\langle g(\gamma), \sigma \rangle\) is invertible. After the W operation, \(\sigma\) becomes CRITICAL and \(\gamma\) become SECONDARY. The W method updates the reduction accordingly (in time \(\mathcal O(n^2)\)).
| p | Argument Cell_pair containing \(\sigma\), \(\gamma\) and the dimension of the pair. |
| void CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::W | ( | size_t | sigma, |
| size_t | gamma, | ||
| int | q ) |
W operation.
A pair of cells \((\sigma, \gamma)\) of dimension q, with \(\sigma\) SECONDARY and \(\gamma\) CRITICAL, is valid for W if \(\langle g(\gamma), \sigma \rangle\) is invertible. After the W operation, \(\sigma\) becomes CRITICAL and \(\gamma\) become SECONDARY. The W method updates the reduction accordingly (in time \(\mathcal O(n^2)\)).
| sigma | First cell of the pair (dimension q) |
| gamma | Second cell of the pair (dimension q) |
| q | Dimension of the pair |
| Invalid_operation | If `q` is 0, `W`operation is not valid and the method raises a `std::runtime_error` exception. |
| Invalid_arguments | If \(\langle g(\gamma), \sigma \rangle\) is not invertible, raises a `std::invalid_argument` exception. |
| Incorrect_hdvf_options | Operations can be computed only under HDVF_FULL options, raises a `std::runtime_error` exception otherwise. |
| Column_chain CGAL::Homological_discrete_vector_field::Hdvf< ChainComplex >::z | ( | size_t | sigma, |
| int | q ) |
Compute \(z_q\) function on a cell of dimension q.
This function was first defined in tri-partitions; formally \(z_q = \mathrm{Id} - h_{q-1}\circ \partial_q\).
When the HDVF is perfect, \(z_q(\sigma)\) is the canonical cycle associated to \(\sigma\). Intuitively:
Moreover, in HDVF_persistent, z function provides persistent homology generators.
| sigma | Cell index. |
| q | Cell dimension. |