VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/StatisticsGnuR/vtkRRandomTableSource.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkRRandomTableSource.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 2009 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 -------------------------------------------------------------------------*/
00020 
00057 #ifndef vtkRRandomTableSource_h
00058 #define vtkRRandomTableSource_h
00059 
00060 #include "vtkFiltersStatisticsGnuRModule.h" // For export macro
00061 #include "vtkTableAlgorithm.h"
00062 
00063 class vtkRrtsimplementation;
00064 
00065 class VTKFILTERSSTATISTICSGNUR_EXPORT vtkRRandomTableSource : public vtkTableAlgorithm
00066 {
00067 
00068 public:
00069 
00070   static vtkRRandomTableSource* New();
00071   vtkTypeMacro(vtkRRandomTableSource,vtkTableAlgorithm);
00072   void PrintSelf(ostream& os, vtkIndent indent);
00073 
00075 
00076   void SetNumberOfRows(int nrows);
00077   int GetNumberOfRows();
00079 
00081   int GetNumberOfColumns();
00082 
00085   void ClearTableOutput();
00086 
00089   void SetRandGenSeed(const int seed);
00090 
00091 //BTX
00093 
00096   typedef enum
00097     {
00099 
00100     WILCOXONRANKSUM = 0,    // Wilcoxon rank sum
00101                             // param1 - number of observations in the first sample
00102                             // param2 - number of observations in the second sample
00103                             // param3 - not used
00104 
00105     WILCOXONSIGNEDRANK = 1, // Wilcoxon signed rank
00106                             // param1 - number of observations in the sample
00107                             // param2 - not used
00108                             // param3 - not used
00109 
00110     LOGISTIC = 2,    // Logistic
00111                      // param1 - location parameter (usually 0)
00112                      // param2 - scale parameter (usually 1)
00113                      // param3 - not used
00114 
00115     WEIBULL = 3,     // Weibull
00116                      // param1 - shape parameter
00117                      // param2 - scale parameter (usually 1)
00118                      // param3 - not used
00119 
00120     POISSON = 4,     // Poisson
00121                      // param1 - lambda mean
00122                      // param2 - not used
00123                      // param3 - not used
00124 
00125     NEGBINOMIAL = 5, // Negative Binomial
00126                      // param1 - Dispersion parameter, or number of successful trials
00127                      // param2 - Probability of success on each trial
00128                      // param3 - not used
00129 
00130     HYPERGEOM = 6, // Hyper Geometric
00131                    // param1 - number of white balls in the urn
00132                    // param2 - number of black balls in the urn
00133                    // param3 - number of balls drawn from the urn
00134 
00135     GEOM = 7,      // Geometric
00136                    // param1 - rate parameter
00137                    // param2 - not used
00138                    // param3 - not used
00139 
00140     EXP = 8,       // Exponential
00141                    // param1 - rate parameter
00142                    // param2 - not used
00143                    // param3 - not used
00144 
00145     CAUCHY = 9,    // Cauchy
00146                    // param1 - location parameter (usually 0)
00147                    // param2 - scale parameter (usually 1)
00148                    // param3 - not used
00149 
00150     T = 10,         // Student T
00151                     // param1 - degrees of freedom
00152                     // param2 - not used
00153                     // param3 - not used
00154 
00155     F = 11,         // F
00156                     // param1 - degrees of freedom one
00157                     // param2 - degrees of freedom two
00158                     // param3 - not used
00159 
00160     LOGNORMAL = 12, // Log-normal
00161                     // param1 - log mean
00162                     // param2 - log standard deviation
00163                     // param3 - not used
00164 
00165     GAMMA = 13,     // Gamma
00166                     // param1 - shape parameter
00167                     // param2 - scale parameter
00168                     // param3 - not used
00169 
00170     UNIF = 14,      // Uniform
00171                     // param1 - distribution lower limit
00172                     // param2 - distribution upper limit
00173                     // param3 - not used
00174 
00175     BETA = 15,      // Beta
00176                     // param1 - shape parameter one.
00177                     // param2 - shape parameter two.
00178                     // param3 - not used
00179 
00180     BINOMIAL = 16,  // Binomial
00181                     // param1 - number of trials
00182                     // param2 - probability of success on each trial
00183                     // param3 - not used
00184 
00185     NORMAL = 17,    // Normal (Gaussian)
00186                     // param1 - mean
00187                     // param2 - standard deviation
00188                     // param3 - not used
00189 
00190     CHISQUARE = 18, // Chi-square
00191                     // param1 - degrees of freedom
00192                     // param2 - not used
00193                     // param3 - not used
00194 
00195   } StatDistType;
00196 
00198 
00208   void SetStatisticalDistributionForColumn(vtkRRandomTableSource::StatDistType t,
00209                                            double param1,
00210                                            double param2,
00211                                            double param3,
00212                                            const char* ColumnName,
00213                                            int column_index);
00214 //ETX
00216 
00218 
00220   void SetStatisticalDistributionForColumn(int StatDistType,
00221                                            double param1,
00222                                            double param2,
00223                                            double param3,
00224                                            const char* ColumnName,
00225                                            int column_index);
00227 
00228 
00229 protected:
00230   vtkRRandomTableSource();
00231   ~vtkRRandomTableSource();
00232 
00233   int RequestData(
00234     vtkInformation*,
00235     vtkInformationVector**,
00236     vtkInformationVector*);
00237 
00238 private:
00239   vtkRRandomTableSource(const vtkRRandomTableSource&); // Not implemented
00240   void operator=(const vtkRRandomTableSource&);   // Not implemented
00241 
00242   int NumberOfRows;
00243 
00244   vtkRrtsimplementation *impl;
00245 
00246 };
00247 
00248 #endif
00249