VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPKMeansStatistics.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00015 /*------------------------------------------------------------------------- 00016 Copyright 2011 Sandia Corporation. 00017 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 00018 the U.S. Government retains certain rights in this software. 00019 -------------------------------------------------------------------------*/ 00031 #ifndef __vtkPKMeanStatistics_h 00032 #define __vtkPKMeanStatistics_h 00033 00034 #include "vtkFiltersParallelStatisticsModule.h" // For export macro 00035 #include "vtkKMeansStatistics.h" 00036 00037 class vtkMultiProcessController; 00038 class vtkCommunicator; 00039 00040 class VTKFILTERSPARALLELSTATISTICS_EXPORT vtkPKMeansStatistics : public vtkKMeansStatistics 00041 { 00042 public: 00043 static vtkPKMeansStatistics* New(); 00044 vtkTypeMacro(vtkPKMeansStatistics, vtkKMeansStatistics); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00050 virtual void SetController(vtkMultiProcessController*); 00051 vtkGetObjectMacro(Controller, vtkMultiProcessController); 00053 00055 00056 virtual void UpdateClusterCenters( vtkTable* newClusterElements, 00057 vtkTable* curClusterElements, 00058 vtkIdTypeArray* numMembershipChanges, 00059 vtkIdTypeArray* numElementsInCluster, 00060 vtkDoubleArray* error, 00061 vtkIdTypeArray* startRunID, 00062 vtkIdTypeArray* endRunID, 00063 vtkIntArray *computeRun ); 00065 00067 virtual vtkIdType GetTotalNumberOfObservations( vtkIdType numObservations ); 00068 00070 00072 virtual void CreateInitialClusterCenters(vtkIdType numToAllocate, 00073 vtkIdTypeArray* numberOfClusters, 00074 vtkTable* inData, 00075 vtkTable* curClusterElements, 00076 vtkTable* newClusterElements); 00078 00079 00080 protected: 00081 vtkPKMeansStatistics(); 00082 ~vtkPKMeansStatistics(); 00083 00084 vtkMultiProcessController* Controller; 00085 00086 00087 private: 00088 vtkPKMeansStatistics(const vtkPKMeansStatistics&); // Not implemented. 00089 void operator=(const vtkPKMeansStatistics&); // Not implemented. 00090 }; 00091 00092 #endif