1#ifndef vtkKMeansDistanceFunctor_h
2#define vtkKMeansDistanceFunctor_h
16#include "vtkFiltersStatisticsModule.h"
96 vtkTable* curTable,
vtkTable* newTable,
void* vLocalElements,
void* vGlobalElements,
int np);
Abstract superclass for all arrays.
a simple class to control print indentation
measure distance from k-means cluster centers
virtual void PairwiseUpdate(vtkTable *clusterCenters, vtkIdType row, vtkVariantArray *data, vtkIdType dataCardinality, vtkIdType totalCardinality)
This is called once per observation per run per iteration in order to assign the observation to its n...
virtual void UnPackElements(vtkTable *curTable, vtkTable *newTable, void *vLocalElements, void *vGlobalElements, int np)
Unpack the cluster center coordinates in vElements into columns of curTable.
virtual int GetDataType()
Return the data type used to store cluster center coordinates.
virtual void UnPackElements(vtkTable *curTable, void *vLocalElements, vtkIdType numRows, vtkIdType numCols)
Unpack the cluster center coordinates in vElements into columns of curTable.
virtual void operator()(double &, vtkVariantArray *, vtkVariantArray *)
Compute the distance from one observation to another, returning the distance in the first argument.
virtual vtkAbstractArray * CreateCoordinateArray()
Return a vtkAbstractArray capable of holding cluster center coordinates.
vtkKMeansDistanceFunctor()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void PackElements(vtkTable *curTable, void *vElements)
Pack the cluster center coordinates in vElements into columns of curTable.
virtual void * AllocateElementArray(vtkIdType size)
Allocate an array large enough to hold size coordinates and return a void pointer to this array.
virtual vtkVariantArray * GetEmptyTuple(vtkIdType dimension)
Return an empty tuple.
~vtkKMeansDistanceFunctor() override
virtual void DeallocateElementArray(void *)
Free an array allocated with AllocateElementArray.
virtual void PerturbElement(vtkTable *, vtkTable *, vtkIdType, vtkIdType, vtkIdType, double)
When a cluster center (1) has no observations that are closer to it than other cluster centers or (2)...
vtkVariantArray * EmptyTuple
static vtkKMeansDistanceFunctor * New()
abstract base class for most VTK objects
A table, which contains similar-typed columns of data.
An array holding vtkVariants.