VTK  9.3.1
vtkKMeansDistanceFunctorCalculator.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef vtkKMeansDistanceFunctorCalculator_h
4 #define vtkKMeansDistanceFunctorCalculator_h
5 
29 #include "vtkFiltersStatisticsModule.h" // For export macro
31 
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkFunctionParser;
34 class vtkDoubleArray;
35 
36 class VTKFILTERSSTATISTICS_EXPORT vtkKMeansDistanceFunctorCalculator
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
48  void operator()(double&, vtkVariantArray*, vtkVariantArray*) override;
49 
51 
54  vtkSetStringMacro(DistanceExpression);
55  vtkGetStringMacro(DistanceExpression);
57 
59 
65  virtual void SetFunctionParser(vtkFunctionParser*);
66  vtkGetObjectMacro(FunctionParser, vtkFunctionParser);
68 
69 protected:
72 
74  int TupleSize;
76 
77 private:
79  void operator=(const vtkKMeansDistanceFunctorCalculator&) = delete;
80 };
81 
82 VTK_ABI_NAMESPACE_END
83 #endif // vtkKMeansDistanceFunctorCalculator_h
An array holding vtkVariants.
dynamic, self-adjusting array of double
virtual void operator()(double &, vtkVariantArray *, vtkVariantArray *)
Compute the distance from one observation to another, returning the distance in the first argument...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Parse and evaluate a mathematical expression.
a simple class to control print indentation
Definition: vtkIndent.h:28
static vtkKMeansDistanceFunctor * New()
measure distance from k-means cluster centers using a user-specified expression
measure distance from k-means cluster centers