VTK  9.1.0
vtkPKMeansStatistics.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPKMeansStatistics.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15/*-------------------------------------------------------------------------
16 Copyright 2011 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
33#ifndef vtkPKMeansStatistics_h
34#define vtkPKMeansStatistics_h
35
36#include "vtkFiltersParallelStatisticsModule.h" // For export macro
37#include "vtkKMeansStatistics.h"
38
40class vtkCommunicator;
41
42class VTKFILTERSPARALLELSTATISTICS_EXPORT vtkPKMeansStatistics : public vtkKMeansStatistics
43{
44public:
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
50
55 vtkGetObjectMacro(Controller, vtkMultiProcessController);
57
61 void UpdateClusterCenters(vtkTable* newClusterElements, vtkTable* curClusterElements,
62 vtkIdTypeArray* numMembershipChanges, vtkIdTypeArray* numElementsInCluster,
63 vtkDoubleArray* error, vtkIdTypeArray* startRunID, vtkIdTypeArray* endRunID,
64 vtkIntArray* computeRun) override;
65
70
74 void CreateInitialClusterCenters(vtkIdType numToAllocate, vtkIdTypeArray* numberOfClusters,
75 vtkTable* inData, vtkTable* curClusterElements, vtkTable* newClusterElements) override;
76
77protected:
80
82
83private:
85 void operator=(const vtkPKMeansStatistics&) = delete;
86};
87
88#endif
Used to send/receive messages in a multiprocess environment.
dynamic, self-adjusting array of double
dynamic, self-adjusting array of vtkIdType
a simple class to control print indentation
Definition: vtkIndent.h:113
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:149
A class for KMeans clustering.
Multiprocessing communication superclass.
vtkIdType GetTotalNumberOfObservations(vtkIdType numObservations) override
Subroutine to get the total number of data objects.
void UpdateClusterCenters(vtkTable *newClusterElements, vtkTable *curClusterElements, vtkIdTypeArray *numMembershipChanges, vtkIdTypeArray *numElementsInCluster, vtkDoubleArray *error, vtkIdTypeArray *startRunID, vtkIdTypeArray *endRunID, vtkIntArray *computeRun) override
Subroutine to update new cluster centers from the old centers.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CreateInitialClusterCenters(vtkIdType numToAllocate, vtkIdTypeArray *numberOfClusters, vtkTable *inData, vtkTable *curClusterElements, vtkTable *newClusterElements) override
Subroutine to initialize cluster centerss if not provided by the user.
~vtkPKMeansStatistics() override
vtkMultiProcessController * Controller
static vtkPKMeansStatistics * New()
virtual void SetController(vtkMultiProcessController *)
Get/Set the multiprocess controller.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:172
int vtkIdType
Definition: vtkType.h:332