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 =========================================================================*/
26 #ifndef __vtkPKMeanStatistics_h
27 #define __vtkPKMeanStatistics_h
28 
29 #include "vtkKMeansStatistics.h"
30 
32 class vtkCommunicator;
33 
35 {
36 public:
37  static vtkPKMeansStatistics* New();
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
42 
44  virtual void SetController(vtkMultiProcessController*);
45  vtkGetObjectMacro(Controller, vtkMultiProcessController);
47 
49 
50  virtual void UpdateClusterCenters( vtkTable* newClusterElements,
51  vtkTable* curClusterElements,
52  vtkIdTypeArray* numMembershipChanges,
53  vtkIdTypeArray* numElementsInCluster,
54  vtkDoubleArray* error,
55  vtkIdTypeArray* startRunID,
56  vtkIdTypeArray* endRunID,
57  vtkIntArray *computeRun );
59 
61  virtual vtkIdType GetTotalNumberOfObservations( vtkIdType numObservations );
62 
64 
66  virtual void CreateInitialClusterCenters(vtkIdType numToAllocate,
67  vtkIdTypeArray* numberOfClusters,
68  vtkTable* inData,
69  vtkTable* curClusterElements,
70  vtkTable* newClusterElements);
72 
73 
74 protected:
77 
79 
80 
81 private:
82  vtkPKMeansStatistics(const vtkPKMeansStatistics&); // Not implemented.
83  void operator=(const vtkPKMeansStatistics&); // Not implemented.
84 };
85 
86 #endif
87 
dynamic, self-adjusting array of vtkIdType
int vtkIdType
Definition: vtkType.h:255
dynamic, self-adjusting array of double
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:42
a simple class to control print indentation
Definition: vtkIndent.h:37
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:66
#define VTK_INFOVIS_EXPORT
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.