VTK  9.3.0
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 
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
dynamic, self-adjusting array of double
Parse and evaluate a mathematical expression.
a simple class to control print indentation
Definition: vtkIndent.h:38
measure distance from k-means cluster centers using a user-specified expression
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkKMeansDistanceFunctorCalculator * New()
virtual void SetFunctionParser(vtkFunctionParser *)
Set/get the string containing an expression which evaluates to the distance metric used for k-means c...
void operator()(double &, vtkVariantArray *, vtkVariantArray *) override
Compute the distance from one observation to another, returning the distance in the first argument.
measure distance from k-means cluster centers
An array holding vtkVariants.