TTK
Loading...
Searching...
No Matches
PersistenceDiagramClustering.h
Go to the documentation of this file.
1
29
30#pragma once
31
32// base code includes
33#include <PDClustering.h>
35
36namespace ttk {
37
38 class PersistenceDiagramClustering : virtual public Debug {
39
40 public:
42 this->setDebugMsgPrefix("PersistenceDiagramClustering");
43 }
44
45 ~PersistenceDiagramClustering() override = default;
46
47 std::vector<int> execute(
48 std::vector<DiagramType> &intermediateDiagrams,
49 std::vector<DiagramType> &centroids,
50 std::vector<std::vector<std::vector<MatchingType>>> &all_matchings);
51
52 std::array<double, 3> getDistances() const {
53 return this->distances;
54 }
55
56 void setTimeLimit(double timeLimit) {
57 this->TimeLimit = timeLimit;
58 }
59
60 void setForceUseOfAlgorithm(bool forceUseOfAlgorithm) {
61 this->ForceUseOfAlgorithm = forceUseOfAlgorithm;
62 }
63
64 void setDeltaLim(double DeltaLimNew) {
65 this->DeltaLim = DeltaLimNew;
66 }
67
68 void setUseAdditionalPrecision(bool Precision) {
69 this->UseAdditionalPrecision = Precision;
70 }
71
72 void setUseProgressive(bool UseProgressive_) {
73 this->UseProgressive = UseProgressive_;
74 }
75
76 void setUseInterruptible(bool UseInterruptible_) {
77 this->UseInterruptible = UseInterruptible_;
78 }
79
80 void setDeterministic(bool Deterministic_) {
81 this->Deterministic = Deterministic_;
82 }
83
84 void setAlpha(double Alpha_) {
85 this->Alpha = Alpha_;
86 }
87
88 void setUseAccelerated(bool UseAccelerated_) {
89 this->UseAccelerated = UseAccelerated_;
90 }
91
92 void setUseKmeansppInit(bool UseKmeansppInit_) {
93 this->UseKmeansppInit = UseKmeansppInit_;
94 }
95
96 protected:
97 // Critical pairs used for clustering
98 // 0:min-saddles ; 1:saddles-saddles ; 2:sad-max ; else : all
99
100 // distance results per pair type
101 std::array<double, 3> distances{};
102
105 bool Deterministic{true};
107
108 bool UseProgressive{true};
109
112 double Alpha{1.0};
114 double DeltaLim{0.01};
115 double Lambda{1.0};
116 double TimeLimit{999999};
117 double NonMatchingWeight = 1.0;
118
120 bool UseAccelerated{false};
121 bool UseKmeansppInit{false};
122
125 };
126
127} // namespace ttk
Minimalist debugging class.
Definition Debug.h:88
void setDebugMsgPrefix(const std::string &prefix)
Definition Debug.h:364
TTK processing package for the computation of Wasserstein barycenters and K-Means clusterings of a se...
void setUseInterruptible(bool UseInterruptible_)
std::array< double, 3 > getDistances() const
std::vector< int > execute(std::vector< DiagramType > &intermediateDiagrams, std::vector< DiagramType > &centroids, std::vector< std::vector< std::vector< MatchingType > > > &all_matchings)
void setForceUseOfAlgorithm(bool forceUseOfAlgorithm)
~PersistenceDiagramClustering() override=default
The Topology ToolKit.