![]() |
Mackey
V3.1
A C++ library for computing RO(G) graded homology
|
#include <Morse.hpp>
Public Member Functions | |
const auto & | original_to_reduced () const |
Returns vector of "change of basis" matrices from the original to the reduced basis. More... | |
const auto & | reduced_to_original () const |
Returns vector of "change of basis" matrices from the reduced to the original basis. More... | |
double | reduction_ratio () const |
Returns the average compression ratio as a double in [0,1]. Ideally as close to 0 as possible. More... | |
AMT (std::vector< diff_t > &A, bool compute_original_to_reduced, bool compute_reduced_to_original) | |
Constructor that reduces. More... | |
Protected Types | |
typedef diff_t::StorageIndex | ind |
The storage type of the differential matrices (eg size_t) More... | |
typedef diff_t::Scalar | scalar_t |
The scalar type of the differential matrices (eg int or Z2) More... | |
typedef Eigen::SparseMatrix< scalar_t, 1, ind > | row_major_t |
The type of row major of the differential matrices (eg size_t) More... | |
Protected Member Functions | |
AMT (std::vector< diff_t > &A, bool compute_original_to_reduced, bool compute_reduced_to_original, bool onlyresize) | |
Constructor that allows only to resize. More... | |
void | reduce () |
Performs the reduction and sets the "change of basis" f,g. More... | |
void | find_Morse_matching (int k, bool normalize) |
Sets the morse matchiing and normalizes diff if normalize=1 (this speeds up the AMT algorithm) More... | |
void | normalize (int k) |
Normalize diff if not done in find_Morse_matching. More... | |
void | erase_matchings (int k, const std::vector< std::pair< ind, ind >> &toremove) |
Erase the given morse matchings (eg if they are not equivariant). More... | |
Protected Attributes | |
std::vector< diff_t > & | diff |
The reduced differential. More... | |
std::vector< std::map< ind, ind > > | morse |
The morse matching. More... | |
std::vector< std::vector< ind > > | critical |
The critical basis elements. More... | |
Reduces given chain complex to a homotopy equivalent one but ideally smaller, using Algebraic Morse Theory
The constructor performs the computation and modifies the chain complex in place to avoid copies. If you need the original chain complex please store it before passing it here.
|
protected |
The storage type of the differential matrices (eg size_t)
|
protected |
The scalar type of the differential matrices (eg int or Z2)
|
protected |
The type of row major of the differential matrices (eg size_t)
AMT | ( | std::vector< diff_t > & | A, |
bool | compute_original_to_reduced, | ||
bool | compute_reduced_to_original | ||
) |
Constructor that reduces.
|
protected |
Constructor that allows only to resize.
const auto& original_to_reduced | ( | ) | const |
Returns vector of "change of basis" matrices from the original to the reduced basis.
const auto& reduced_to_original | ( | ) | const |
Returns vector of "change of basis" matrices from the reduced to the original basis.
double reduction_ratio | ( | ) | const |
Returns the average compression ratio as a double in [0,1]. Ideally as close to 0 as possible.
|
protected |
Performs the reduction and sets the "change of basis" f,g.
|
protected |
Sets the morse matchiing and normalizes diff if normalize=1 (this speeds up the AMT algorithm)
|
protected |
Normalize diff if not done in find_Morse_matching.
Erase the given morse matchings (eg if they are not equivariant).
|
protected |
The reduced differential.
|
protected |
The critical basis elements.