VTK  9.0.2
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:
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 
77 protected:
80 
82 
83 private:
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:34
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:40
A class for KMeans clustering.
Multiprocessing communication superclass.
static vtkPKMeansStatistics * New()
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
virtual void SetController(vtkMultiProcessController *)
Get/Set the multiprocess controller.
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:63
int vtkIdType
Definition: vtkType.h:338