|
PersistentLaplacians
|
#include <PersistentLaplacian.hpp>
Public Attributes | |
| int | top_dim |
| Top dimension of the complex. More... | |
| std::vector< FilteredBoundaryMatrix< storage > > | filtered_boundaries |
| Boundary matrix assuming real (or integer) coefficients. More... | |
| bool | verbose |
| Print progress if spectra() is called. More... | |
| bool | use_flipped |
| Compute the top-dimensional Laplacian's eigenvalues in spectra function via the eigenvalues of the smaller of B_N B_N^T or B_N^T B_N and possible zero-padding. More... | |
| Profile | profile |
| Profiler to track time usage of various steps. More... | |
Protected Member Functions | |
| PersistentLaplacians::FilteredBoundaryMatrix< storage > | dummy_d0 () |
Primary class for computing persistent Laplacians
| eigs_Algorithm | Algorithm wrapper class to use for computing eigenvalues of the Laplacian in the spectra family of functions. Default is a wrapper for Eigen::SelfAdjointEigenSolver. |
| up_Algorithm | Algorithm wrapper class to use for computing the up-Laplacian. Default is the Schur complement algorithm presented in Memoli, Wan, and Wang 2020. //TODO: \see up_algorithms and eigs_algorithms |
|
inline |
Default constructor with no boundary maps or simplices.
|
inline |
| boundaries | a vector of Eigen::SparseMatrix of type int. Boundaries must be sorted in order of dimension. |
| filtrations | a vector of vector of filtrations. filtrations[dim] is a list of all filtrations of simplices in dimension dim. filtrations must be sorted in order of dimension, each filtrations[i] must be sorted in order of filtration |
Primary constructor. Important Assumptions: 1) Boundary matrix has real coefficients stored as integers (but not mod 2!) 2) Boundary matrix dimensions agree with filtrations sizes 3) Length(filtrations) = Length(boundaries) + 1
|
inline |
|
inlineprotected |
|
inline |
Get all eigenvalues for all combinations of dimension and successive filtration values: a=filtrations[i] and b=filtrations[i+1]. Note: the caller does not know what spectra to expect from this.
|
inline |
Get the Persistent Laplacian's eigenvalues and eigenvectors at a given dimension and filtration.
| dim | dimension |
| a | start filtration level |
| b | end filtration level |
|
inline |
This function essentially just calls eigenpairs(dim, a, b) in a loop.
| spectra_quest_list | vector of tuples (dim, a, b) to compute the eigenvalues of L_{dim}^{a,b}. |
|
inline |
Utility function to get the Betti number and least nonzero eigenvalue form a vector of eigenvalues.
| eigenvalues | eigenvalues |
|
inline |
Get tuples (dim, a, b) for all combinations of dimension and successive filtration values: a=filtrations[i], b=filtrations[i+1].
| filtrations | vector of filtration values |
| dims | vector of dimensions |
|
inline |
Get all unique filtration values in the complex.
|
inline |
Get the down persistent Laplacian (by value).
Warning: this does a potentially expensive copy. The primary reason this function exists is to provide reasonable python binding access to the matrix itself. If you do not need this matrix directly in python (e.g. you want its eigenvalues) it will be more efficient to compute by reference via get_down(int dim, filtration_type a, SparseMatrix_storage &L_down).
| dim | dimension |
| a | start filtration value \return The matrix (by value) of the down presistent Laplacian |
|
inline |
Get the down persistent Laplacian (by reference).
| dim | dimension | |
| a | start filtration value | |
| [out] | L_down | the matrix (by reference) of the down presistent Laplacian |
|
inline |
Get the Persistent Laplacian Matrix (by value).
Warning: this does a potentially expensive copy. The primary reason this function exists is to provide reasonable python binding access to the matrix L itself. If you do not need the persistent Laplacian matrix directly in python (e.g. you want its eigenvalues) it will be more efficient to compute by reference via get_L(int dim, filtration_type a, filtration_type b, DenseMatrix_PL &L).
| dim | dimension |
| a | start filtration value |
| b | end filtration value (must be >= a) |
|
inline |
Get the Persistent Laplacian Matrix (by reference).
| dim | dimension | |
| a | start filtration value | |
| b | end filtration value (must be >= a) | |
| [out] | L | the matrix where the persistent Laplacian will be stored (by reference). |
|
inline |
Get a matrix with the same nonzero eigenvalues as the top-dimensional Persistent Laplacian Matrix (by value).
Warning: this does a potentially expensive copy. The primary reason this function exists is to provide reasonable python binding access to the matrix itself. If you do not need this matrix directly in python (e.g. you want its eigenvalues) it will be more efficient to compute by reference via get_L_top_dim_flipped(filtration_type a, SparseMatrix_PL &L).
| a | start filtration value |
|
inline |
Get a matrix with the same nonzero eigenvalues as the top-dimensional Persistent Laplacian Matrix (by reference).
| a | start filtration value | |
| [out] | L | the matrix (by reference) that has the same eigenvalues as the top-dimensional Persistent Laplacian |
|
inline |
Get the up persistent Laplacian (by value). The algorithm used is determined by the template parameter. See up_algorithms.hpp.
| dim | dimension |
| a | start filtration value |
| b | end filtration value |
|
inline |
Get the up persistent Laplacian (by reference). The algorithm used is determined by the template parameter. See up_algorithms.hpp.
| dim | dimension | |
| a | start filtration value | |
| b | end filtration value | |
| [out] | L_up | up persistent Laplacian (by reference) |
|
inline |
Compute the nonzero eigenvalues of a persistent Laplacian using Schur restriction with the null space, either given by Persistent Homology representatives or by computing the null space.
| dim | dimension |
| a | start filtration level |
| b | end filtration level |
| (optional) | PH_basis Basis for the null space of the Laplacian, possibly obtained through persistent homology |
| use_dummy_harmonic_basis | Compute the null space of the Laplacian here, then do the same projected as if we had been given the null space |
|
inline |
Print all boundaries and corresponding filtrations.
|
inline |
Set the boundaries and filtrations of a complex, particularly if the default constructor was called.
| boundaries | a vector of Eigen::SparseMatrix of type int. Boundaries must be sorted in order of dimension. |
| filtrations | a vector of vector of filtrations. filtrations[dim] is a list of all filtrations of simplices in dimension dim. filtrations must be sorted in order of dimension, each filtrations[i] must be sorted in order of filtration. Important Assumptions: 1) Boundary matrix has real coefficients stored as integers (but not mod 2!), 2) Boundary matrix dimensions agree with filtrations sizes, 3) Length(filtrations) = Length(boundaries) + 1. |
|
inline |
Set flipped
| use_flipped | New setting |
|
inline |
Set verbose
| verbose | New setting. |
|
inline |
Get all eigenvalues for all combinations of dimension and successive filtration values: a=filtrations[i] and b=filtrations[i+1]. Note: the caller does not know what spectra to expect from this.
|
inline |
Get the Persistent Laplacian's eigenvalues at a given dimension and filtration.
| dim | dimension |
| a | start filtration level |
| b | end filtration level |
|
inline |
This function essentially just calls spectra(dim, a, b) in a loop.
| spectra_quest_list | vector of tuples (dim, a, b) to compute the eigenvalues of L_{dim}^{a,b}. |
|
inline |
Compute and store a persistent Laplacian matrix in a file in matrix market format.
| dim | dimension |
| a | start filtration value |
| b | end filtration value |
| filename | file to store matrix (typically .mtx extension) |
|
inline |
Write spectra to files.
for each dimension dim of the complex, files write "{out_prefix}_spectra_{dim}.txt". Each line of the file is a space-separated list of eigenvalues. Lines may be empty. Note the filtration values are not reported.
| spectra | tuples (dim, a, b, eigenvalues) |
| out_prefix | Eigenvalues will be written to "{out_prefix}_spectra_{dim}.txt" |
|
inline |
Write spectra summary to files "{out_prefix}_spectra_summary.txt"
Each line is a space-separated list of filtrations, bettti numbers, and least nonzero eigenvalues: (filtration a) (filtration b) (betti 0) ... (betti top_dim) (lambda 0) ... (lambda top_dim)
| spectra | tuples (dim, a, b, eigenvalues) |
| out_prefix | Eigenvalues will be written to "{out_prefix}_spectra_summary.txt" |
| std::vector<FilteredBoundaryMatrix<storage> > PersistentLaplacians::PersistentLaplacian< eigs_Algorithm, up_Algorithm >::filtered_boundaries |
Boundary matrix assuming real (or integer) coefficients.
| Profile PersistentLaplacians::PersistentLaplacian< eigs_Algorithm, up_Algorithm >::profile |
Profiler to track time usage of various steps.
| int PersistentLaplacians::PersistentLaplacian< eigs_Algorithm, up_Algorithm >::top_dim |
Top dimension of the complex.
| bool PersistentLaplacians::PersistentLaplacian< eigs_Algorithm, up_Algorithm >::use_flipped |
Compute the top-dimensional Laplacian's eigenvalues in spectra function via the eigenvalues of the smaller of B_N B_N^T or B_N^T B_N and possible zero-padding.
| bool PersistentLaplacians::PersistentLaplacian< eigs_Algorithm, up_Algorithm >::verbose |
Print progress if spectra() is called.