VTK  9.3.20240424
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
32VTK_ABI_NAMESPACE_BEGIN
34class vtkDoubleArray;
35
36class VTKFILTERSSTATISTICS_EXPORT vtkKMeansDistanceFunctorCalculator
38{
39public:
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
69protected:
72
76
77private:
79 void operator=(const vtkKMeansDistanceFunctorCalculator&) = delete;
80};
81
82VTK_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:108
measure distance from k-means cluster centers using a user-specified expression
static vtkKMeansDistanceFunctorCalculator * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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.