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