VTK: Filters/Statistics/vtkKMeansDistanceFunctorCalculator.h Source File

| 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
30 #include "vtkKMeansDistanceFunctor.h"
31
32 VTK_ABI_NAMESPACE_BEGIN
33 class vtkFunctionParser;
34 class vtkDoubleArray;
35
36 class VTKFILTERSSTATISTICS_EXPORT vtkKMeansDistanceFunctorCalculator
37 : public vtkKMeansDistanceFunctor
38 {
39 public:
40 static vtkKMeansDistanceFunctorCalculator* New();
41 vtkTypeMacro(vtkKMeansDistanceFunctorCalculator, vtkKMeansDistanceFunctor);
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:
70 vtkKMeansDistanceFunctorCalculator();
71 ~vtkKMeansDistanceFunctorCalculator() override;
72
73 char* DistanceExpression;
74 int TupleSize;
75 vtkFunctionParser* FunctionParser;
76
77 private:
78 vtkKMeansDistanceFunctorCalculator(const vtkKMeansDistanceFunctorCalculator&) = delete;
79 void operator=(const vtkKMeansDistanceFunctorCalculator&) = delete;
80 };
81
82 VTK_ABI_NAMESPACE_END
83 #endif // vtkKMeansDistanceFunctorCalculator_h
vtkDoubleArray
dynamic, self-adjusting array of double
Definition: vtkDoubleArray.h:40
vtkFunctionParser
Parse and evaluate a mathematical expression.
Definition: vtkFunctionParser.h:135
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkKMeansDistanceFunctorCalculator
measure distance from k-means cluster centers using a user-specified expression
Definition: vtkKMeansDistanceFunctorCalculator.h:38
vtkKMeansDistanceFunctorCalculator::TupleSize
int TupleSize
Definition: vtkKMeansDistanceFunctorCalculator.h:74
vtkKMeansDistanceFunctorCalculator::FunctionParser
vtkFunctionParser * FunctionParser
Definition: vtkKMeansDistanceFunctorCalculator.h:75
vtkKMeansDistanceFunctorCalculator::~vtkKMeansDistanceFunctorCalculator
~vtkKMeansDistanceFunctorCalculator() override
vtkKMeansDistanceFunctorCalculator::vtkKMeansDistanceFunctorCalculator
vtkKMeansDistanceFunctorCalculator()
vtkKMeansDistanceFunctorCalculator::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkKMeansDistanceFunctorCalculator::New
static vtkKMeansDistanceFunctorCalculator * New()
vtkKMeansDistanceFunctorCalculator::DistanceExpression
char * DistanceExpression
Definition: vtkKMeansDistanceFunctorCalculator.h:73
vtkKMeansDistanceFunctorCalculator::SetFunctionParser
virtual void SetFunctionParser(vtkFunctionParser *)
Set/get the string containing an expression which evaluates to the distance metric used for k-means c...
vtkKMeansDistanceFunctorCalculator::operator()
void operator()(double &, vtkVariantArray *, vtkVariantArray *) override
Compute the distance from one observation to another, returning the distance in the first argument.
vtkKMeansDistanceFunctor
measure distance from k-means cluster centers
Definition: vtkKMeansDistanceFunctor.h:27
vtkVariantArray
An array holding vtkVariants.
Definition: vtkVariantArray.h:47
vtkKMeansDistanceFunctor.h