VTK
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  -------------------------------------------------------------------------*/
31 #ifndef vtkPKMeanStatistics_h
32 #define vtkPKMeanStatistics_h
33 
34 #include "vtkFiltersParallelStatisticsModule.h" // For export macro
35 #include "vtkKMeansStatistics.h"
36 
38 class vtkCommunicator;
39 
40 class VTKFILTERSPARALLELSTATISTICS_EXPORT vtkPKMeansStatistics : public vtkKMeansStatistics
41 {
42 public:
43  static vtkPKMeansStatistics* New();
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48 
50  virtual void SetController(vtkMultiProcessController*);
51  vtkGetObjectMacro(Controller, vtkMultiProcessController);
53 
55 
56  virtual void UpdateClusterCenters( vtkTable* newClusterElements,
57  vtkTable* curClusterElements,
58  vtkIdTypeArray* numMembershipChanges,
59  vtkIdTypeArray* numElementsInCluster,
60  vtkDoubleArray* error,
61  vtkIdTypeArray* startRunID,
62  vtkIdTypeArray* endRunID,
63  vtkIntArray *computeRun );
65 
67  virtual vtkIdType GetTotalNumberOfObservations( vtkIdType numObservations );
68 
70 
72  virtual void CreateInitialClusterCenters(vtkIdType numToAllocate,
73  vtkIdTypeArray* numberOfClusters,
74  vtkTable* inData,
75  vtkTable* curClusterElements,
76  vtkTable* newClusterElements);
78 
79 
80 protected:
83 
85 
86 
87 private:
88  vtkPKMeansStatistics(const vtkPKMeansStatistics&); // Not implemented.
89  void operator=(const vtkPKMeansStatistics&); // Not implemented.
90 };
91 
92 #endif
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:275
dynamic, self-adjusting array of double
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:49
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void UpdateClusterCenters(vtkTable *newClusterElements, vtkTable *curClusterElements, vtkIdTypeArray *numMembershipChanges, vtkIdTypeArray *numElementsInCluster, vtkDoubleArray *error, vtkIdTypeArray *startRunID, vtkIdTypeArray *endRunID, vtkIntArray *computeRun)
A class for KMeans clustering.
virtual vtkIdType GetTotalNumberOfObservations(vtkIdType numObservations)
vtkMultiProcessController * Controller
A table, which contains similar-typed columns of data.
Definition: vtkTable.h:67
virtual void CreateInitialClusterCenters(vtkIdType numToAllocate, vtkIdTypeArray *numberOfClusters, vtkTable *inData, vtkTable *curClusterElements, vtkTable *newClusterElements)
Used to send/receive messages in a multiprocess environment.
static vtkKMeansStatistics * New()
virtual void PrintSelf(ostream &os, vtkIndent indent)
Multiprocessing communication superclass.