diff options
author | Arnur Nigmetov <nigmetov@tugraz.at> | 2020-01-14 16:17:43 +0100 |
---|---|---|
committer | Arnur Nigmetov <nigmetov@tugraz.at> | 2020-02-18 15:02:39 +0100 |
commit | ee65fce990b1dc683e1220c18c5f404a82373e55 (patch) | |
tree | 6c4aabba39f4f302024d17ff088d14653a12563e /matching/include/bifiltration.h | |
parent | 6942d80c4d49239bca9cace9833aa74aee11ddcb (diff) |
Interim: matching distance for modules
1. Templatize DistanceCalculator (DiagramProvider)
2. Add BifiltrationProxy with the same interface as ModulePresentation
(dimension fixed).
3. Call Hera with relative error.
4. Add class ModulePresentation.
To-Do: reading module presentations from Rivet format.
Diffstat (limited to 'matching/include/bifiltration.h')
-rw-r--r-- | matching/include/bifiltration.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/matching/include/bifiltration.h b/matching/include/bifiltration.h index c9b64f1..2b4950f 100644 --- a/matching/include/bifiltration.h +++ b/matching/include/bifiltration.h @@ -38,7 +38,7 @@ namespace md { init(); } - DiagramKeeper weighted_slice_diagram(const DualPoint& line, int dim) const; + Diagram weighted_slice_diagram(const DualPoint& line, int dim) const; SimplexVector simplices() const { return simplices_; } @@ -100,8 +100,37 @@ namespace md { }; std::ostream& operator<<(std::ostream& os, const Bifiltration& bif); + + class BifiltrationProxy { + public: + BifiltrationProxy(const Bifiltration& bif, int dim = 0); + // return critical values of simplices that are important for current dimension (dim and dim+1) + PointVec positions() const; + // set current dimension + int set_dim(int new_dim); + + // wrappers of Bifiltration + int maximal_dim() const; + void translate(Real a); + Real minimal_coordinate() const; + Box bounding_box() const; + Real max_x() const; + Real max_y() const; + Real min_x() const; + Real min_y() const; + Diagram weighted_slice_diagram(const DualPoint& slice) const; + + private: + int dim_ { 0 }; + mutable PointVec cached_positions_; + Bifiltration bif_; + + void cache_positions() const; + }; } + + #endif //MATCHING_DISTANCE_BIFILTRATION_H //// The value type of OutputIterator is Simplex_in_2D_filtration |