66 vtkSetMacro(WassersteinMetric,
int);
67 vtkGetMacro(WassersteinMetric,
int);
69 vtkSetMacro(UseProgressive,
bool);
70 vtkGetMacro(UseProgressive,
bool);
72 vtkSetMacro(TimeLimit,
double);
73 vtkGetMacro(TimeLimit,
double);
76 this->Alpha = std::min(std::abs(alpha), 1.0);
80 SetAlpha(1.0 - antiAlpha);
82 vtkGetMacro(Alpha,
double);
84 vtkSetMacro(DeltaLim,
double);
85 vtkGetMacro(DeltaLim,
double);
87 vtkSetMacro(Lambda,
double);
88 vtkGetMacro(Lambda,
double);
90 vtkSetMacro(NumberOfClusters,
int);
91 vtkGetMacro(NumberOfClusters,
int);
93 vtkSetMacro(UseAccelerated,
bool);
94 vtkGetMacro(UseAccelerated,
bool);
96 vtkSetMacro(UseKmeansppInit,
bool);
97 vtkGetMacro(UseKmeansppInit,
bool);
99 vtkSetMacro(ForceUseOfAlgorithm,
bool);
100 vtkGetMacro(ForceUseOfAlgorithm,
bool);
102 vtkSetMacro(Deterministic,
bool);
103 vtkGetMacro(Deterministic,
bool);
105 vtkSetMacro(PairTypeClustering,
int);
106 vtkGetMacro(PairTypeClustering,
int);
109 this->Spacing = spacing;
111 if(!intermediateDiagrams_.empty()) {
113 this->needUpdate_ =
false;
116 vtkGetMacro(Spacing,
double);
119 this->DisplayMethod =
static_cast<DISPLAY>(displayMethod);
121 if(!intermediateDiagrams_.empty()) {
123 this->needUpdate_ =
false;
128 vtkSetMacro(UseAdditionalPrecision,
bool);
129 vtkGetMacro(UseAdditionalPrecision,
bool);
131 vtkSetMacro(DistanceWritingOptions,
int);
132 vtkGetMacro(DistanceWritingOptions,
int);
134 vtkSetMacro(UseInterruptible,
bool);
135 vtkGetMacro(UseInterruptible,
bool);
140 vtkSetMacro(NonMatchingWeight,
double);
141 vtkGetMacro(NonMatchingWeight,
double);
148 void Modified()
override;
150 void outputClusteredDiagrams(
151 vtkMultiBlockDataSet *output,
152 const std::vector<vtkUnstructuredGrid *> &diagsVTU,
153 const std::vector<ttk::DiagramType> &diags,
154 const std::vector<std::vector<std::vector<ttk::MatchingType>>>
155 &matchingsPerCluster,
156 const std::vector<int> &inv_clustering,
158 const double spacing,
159 const double max_persistence)
const;
160 void outputCentroids(
161 vtkMultiBlockDataSet *output,
162 const std::vector<ttk::DiagramType> &final_centroids,
163 const std::vector<std::vector<std::vector<ttk::MatchingType>>>
164 &matchingsPerCluster,
165 vtkUnstructuredGrid *
const someInputDiag,
167 const double spacing,
168 const double max_persistence)
const;
169 void outputMatchings(
170 vtkMultiBlockDataSet *output,
171 const size_t nClusters,
172 const std::vector<ttk::DiagramType> &diags,
173 const std::vector<std::vector<std::vector<ttk::MatchingType>>>
174 &matchingsPerCluster,
175 const std::vector<ttk::DiagramType> ¢roids,
176 const std::vector<int> &inv_clustering,
178 const double spacing,
179 const double max_persistence)
const;
182 vtkInformationVector **inputVector,
183 vtkInformationVector *outputVector)
override;
186 std::vector<ttk::DiagramType> intermediateDiagrams_{};
187 std::vector<std::vector<std::vector<ttk::MatchingType>>> all_matchings_{};
188 std::vector<ttk::DiagramType> final_centroids_{};
189 std::vector<int> inv_clustering_{};
192 double max_dimension_total_{};
194 DISPLAY DisplayMethod{DISPLAY::COMPACT};
195 METHOD Method{METHOD::PROGRESSIVE};
196 bool needUpdate_{
true};