VTK
vtkRRandomTableSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkRRandomTableSource.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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2009 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
20 
57 #ifndef vtkRRandomTableSource_h
58 #define vtkRRandomTableSource_h
59 
60 #include "vtkFiltersStatisticsGnuRModule.h" // For export macro
61 #include "vtkTableAlgorithm.h"
62 
63 class vtkRrtsimplementation;
64 
65 class VTKFILTERSSTATISTICSGNUR_EXPORT vtkRRandomTableSource : public vtkTableAlgorithm
66 {
67 
68 public:
69 
70  static vtkRRandomTableSource* New();
72  void PrintSelf(ostream& os, vtkIndent indent);
73 
75 
76  void SetNumberOfRows(int nrows);
77  int GetNumberOfRows();
79 
81  int GetNumberOfColumns();
82 
85  void ClearTableOutput();
86 
89  void SetRandGenSeed(const int seed);
90 
91 //BTX
93 
96  typedef enum
97  {
99 
100  WILCOXONRANKSUM = 0, // Wilcoxon rank sum
101  // param1 - number of observations in the first sample
102  // param2 - number of observations in the second sample
103  // param3 - not used
104 
105  WILCOXONSIGNEDRANK = 1, // Wilcoxon signed rank
106  // param1 - number of observations in the sample
107  // param2 - not used
108  // param3 - not used
109 
110  LOGISTIC = 2, // Logistic
111  // param1 - location parameter (usually 0)
112  // param2 - scale parameter (usually 1)
113  // param3 - not used
114 
115  WEIBULL = 3, // Weibull
116  // param1 - shape parameter
117  // param2 - scale parameter (usually 1)
118  // param3 - not used
119 
120  POISSON = 4, // Poisson
121  // param1 - lambda mean
122  // param2 - not used
123  // param3 - not used
124 
125  NEGBINOMIAL = 5, // Negative Binomial
126  // param1 - Dispersion parameter, or number of successful trials
127  // param2 - Probability of success on each trial
128  // param3 - not used
129 
130  HYPERGEOM = 6, // Hyper Geometric
131  // param1 - number of white balls in the urn
132  // param2 - number of black balls in the urn
133  // param3 - number of balls drawn from the urn
134 
135  GEOM = 7, // Geometric
136  // param1 - rate parameter
137  // param2 - not used
138  // param3 - not used
139 
140  EXP = 8, // Exponential
141  // param1 - rate parameter
142  // param2 - not used
143  // param3 - not used
144 
145  CAUCHY = 9, // Cauchy
146  // param1 - location parameter (usually 0)
147  // param2 - scale parameter (usually 1)
148  // param3 - not used
149 
150  T = 10, // Student T
151  // param1 - degrees of freedom
152  // param2 - not used
153  // param3 - not used
154 
155  F = 11, // F
156  // param1 - degrees of freedom one
157  // param2 - degrees of freedom two
158  // param3 - not used
159 
160  LOGNORMAL = 12, // Log-normal
161  // param1 - log mean
162  // param2 - log standard deviation
163  // param3 - not used
164 
165  GAMMA = 13, // Gamma
166  // param1 - shape parameter
167  // param2 - scale parameter
168  // param3 - not used
169 
170  UNIF = 14, // Uniform
171  // param1 - distribution lower limit
172  // param2 - distribution upper limit
173  // param3 - not used
174 
175  BETA = 15, // Beta
176  // param1 - shape parameter one.
177  // param2 - shape parameter two.
178  // param3 - not used
179 
180  BINOMIAL = 16, // Binomial
181  // param1 - number of trials
182  // param2 - probability of success on each trial
183  // param3 - not used
184 
185  NORMAL = 17, // Normal (Gaussian)
186  // param1 - mean
187  // param2 - standard deviation
188  // param3 - not used
189 
190  CHISQUARE = 18, // Chi-square
191  // param1 - degrees of freedom
192  // param2 - not used
193  // param3 - not used
194 
195  } StatDistType;
196 
198 
208  void SetStatisticalDistributionForColumn(vtkRRandomTableSource::StatDistType t,
209  double param1,
210  double param2,
211  double param3,
212  const char* ColumnName,
213  int column_index);
214 //ETX
216 
218 
220  void SetStatisticalDistributionForColumn(int StatDistType,
221  double param1,
222  double param2,
223  double param3,
224  const char* ColumnName,
225  int column_index);
227 
228 
229 protected:
232 
233  int RequestData(
237 
238 private:
239  vtkRRandomTableSource(const vtkRRandomTableSource&); // Not implemented
240  void operator=(const vtkRRandomTableSource&); // Not implemented
241 
242  int NumberOfRows;
243 
244  vtkRrtsimplementation *impl;
245 
246 };
247 
248 #endif
249 
void PrintSelf(ostream &os, vtkIndent indent)
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
a simple class to control print indentation
Definition: vtkIndent.h:38
Generates vtkTables with columns of random numbers using Gnu R.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Superclass for algorithms that produce only vtkTables as output.
Store zero or more vtkInformation instances.