VTK  9.2.6
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 
40 class vtkCommunicator;
41 
42 class VTKFILTERSPARALLELSTATISTICS_EXPORT vtkPKMeansStatistics : public vtkKMeansStatistics
43 {
44 public:
45  static vtkPKMeansStatistics* New();
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
50 
54  virtual void SetController(vtkMultiProcessController*);
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 
69  vtkIdType GetTotalNumberOfObservations(vtkIdType numObservations) override;
70 
74  void CreateInitialClusterCenters(vtkIdType numToAllocate, vtkIdTypeArray* numberOfClusters,
75  vtkTable* inData, vtkTable* curClusterElements, vtkTable* newClusterElements) override;
76 
77 protected:
79  ~vtkPKMeansStatistics() override;
80 
82 
83 private:
85  void operator=(const vtkPKMeansStatistics&) = delete;
86 };
87 
88 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:332
dynamic, self-adjusting array of double
virtual void UpdateClusterCenters(vtkTable *newClusterElements, vtkTable *curClusterElements, vtkIdTypeArray *numMembershipChanges, vtkIdTypeArray *numDataElementsInCluster, vtkDoubleArray *error, vtkIdTypeArray *startRunID, vtkIdTypeArray *endRunID, vtkIntArray *computeRun)
Subroutine to update new cluster centers from the old centers.
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
a simple class to control print indentation
Definition: vtkIndent.h:39
A class for KMeans clustering.
virtual vtkIdType GetTotalNumberOfObservations(vtkIdType numObservations)
Subroutine to get the total number of observations.
vtkMultiProcessController * Controller
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:73
virtual void CreateInitialClusterCenters(vtkIdType numToAllocate, vtkIdTypeArray *numberOfClusters, vtkTable *inData, vtkTable *curClusterElements, vtkTable *newClusterElements)
Subroutine to initialize cluster centerss if not provided by the user.
Used to send/receive messages in a multiprocess environment.
static vtkKMeansStatistics * New()
Multiprocessing communication superclass.