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