vtkPSciVizKMeans.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
22 #ifndef vtkPSciVizKMeans_h
23 #define vtkPSciVizKMeans_h
24 
25 #include "vtkPVVTKExtensionsFiltersStatisticsModule.h" //needed for exports
26 #include "vtkSciVizStatistics.h"
27 
29 {
30 public:
31  static vtkPSciVizKMeans* New();
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
36 
42  vtkSetMacro(K, int);
43  vtkGetMacro(K, int);
45 
47 
51  vtkSetMacro(MaxNumIterations, int);
52  vtkGetMacro(MaxNumIterations, int);
54 
56 
60  vtkSetMacro(Tolerance, double);
61  vtkGetMacro(Tolerance, double);
63 
64 protected:
66  ~vtkPSciVizKMeans() override;
67 
68  int LearnAndDerive(vtkMultiBlockDataSet* model, vtkTable* inData) override;
69  int AssessData(
70  vtkTable* observations, vtkDataObject* dataset, vtkMultiBlockDataSet* model) override;
71 
72  int K;
74  double Tolerance;
75 
76 private:
77  vtkPSciVizKMeans(const vtkPSciVizKMeans&) = delete;
78  void operator=(const vtkPSciVizKMeans&) = delete;
79 };
80 
81 #endif // vtkPSciVizKMeans_h
virtual int AssessData(vtkTable *observations, vtkDataObject *dataset, vtkMultiBlockDataSet *model)=0
Method subclasses must override to assess an input table given a model of the proper type...
#define VTKPVVTKEXTENSIONSFILTERSSTATISTICS_EXPORT
static vtkTableAlgorithm * New()
virtual int LearnAndDerive(vtkMultiBlockDataSet *model, vtkTable *inData)=0
Method subclasses must override to calculate a full model from the given input data.
Abstract base class for computing statistics with vtkStatistics.
void PrintSelf(ostream &os, vtkIndent indent) override
Find k cluster centers and/or assess the closest center and distance to it for each datum...