PersistentLaplacians
PersistentSheafLaplacian.hpp
Go to the documentation of this file.
1 #ifndef PSL_H
2 #define PSL_H
3 
4 #include "../core/PersistentLaplacian.hpp"
5 #include "sheaf_simplex_tree.hpp"
6 
7 //
8 // CAUTION:
9 // sheaf simplex tree uses coboundaries
10 // package assumes boundaries
11 // probably need to either transpose or rewrite some function for coboundaries
12 //
13 //
14 //
15 //
16 //
17 //
18 //
19 namespace PersistentLaplacians{
20  template <typename eigs_Algorithm = PersistentLaplacians::selfadjoint, typename up_Algorithm = PersistentLaplacians::schur>
21  class PersistentSheafLaplacian : public PersistentLaplacian<eigs_Algorithm,up_Algorithm> {
22  public:
23  PersistentSheafLaplacian(sheaf_simplex_tree& sst) : PersistentLaplacians::PersistentLaplacian<eigs_Algorithm>() { // call default constructor of parent class
24  std::vector<FilteredBoundaryMatrix<float>> filtered_boundaries_temp = sst.apply_restriction_function();
25  // this->filtered_boundaries = sst.apply_restriction_function();
26  for (auto fbm : filtered_boundaries_temp){
27  this->filtered_boundaries.push_back(fbm);
28  }
29  this->top_dim = this->filtered_boundaries.size();
30  std::cout << "Created filtered boundary matrices for cellular sheaf:" << std::endl;
31  for (int i = 0; i < (int) this->filtered_boundaries.size(); i++){
32  std::cout << "\nDim " << i << " matrix:" << std::endl;
33  this->filtered_boundaries[i].print();
34  std::cout << "Dim " << i << " domain filtration values:";
35  this->filtered_boundaries[i].print_domain_filtration();
36  std::cout << "Dim " << i << " range filtration values:";
37  this->filtered_boundaries[i].print_range_filtration();
38  }
39  std::cout << "got filtered coboundaries, now transpose" << std::endl;
40 
41 
42  for (int i = 0; i < (int) this->filtered_boundaries.size(); i++){
43  this->filtered_boundaries[i] = this->filtered_boundaries[i].transpose();
44  }
45  std::cout << "done transposing" << std::endl;
46  }
47  private:
48 
49 
50  };
51 }
52 
53 #endif
Definition: PersistentLaplacian.hpp:30
std::vector< FilteredBoundaryMatrix< storage > > filtered_boundaries
Boundary matrix assuming real (or integer) coefficients.
Definition: PersistentLaplacian.hpp:38
int top_dim
Top dimension of the complex.
Definition: PersistentLaplacian.hpp:37
Definition: PersistentSheafLaplacian.hpp:21
PersistentSheafLaplacian(sheaf_simplex_tree &sst)
Definition: PersistentSheafLaplacian.hpp:23
Definition: sheaf_simplex_tree.hpp:20
std::vector< FilteredBoundaryMatrix< float > > apply_restriction_function()
Definition: sheaf_simplex_tree.hpp:53
Definition: PersistentLaplacians.cpp:7