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 
58 #ifndef vtkRRandomTableSource_h
59 #define vtkRRandomTableSource_h
60 
61 #include "vtkFiltersStatisticsGnuRModule.h" // For export macro
62 #include "vtkTableAlgorithm.h"
63 
64 class vtkRrtsimplementation;
65 
66 class VTKFILTERSSTATISTICSGNUR_EXPORT vtkRRandomTableSource : public vtkTableAlgorithm
67 {
68 
69 public:
70 
71  static vtkRRandomTableSource* New();
73  void PrintSelf(ostream& os, vtkIndent indent);
74 
76 
79  void SetNumberOfRows(int nrows);
80  int GetNumberOfRows();
82 
86  int GetNumberOfColumns();
87 
92  void ClearTableOutput();
93 
98  void SetRandGenSeed(const int seed);
99 
104  typedef enum
105  {
106 
107  WILCOXONRANKSUM = 0, // Wilcoxon rank sum
108  // param1 - number of observations in the first sample
109  // param2 - number of observations in the second sample
110  // param3 - not used
111 
112  WILCOXONSIGNEDRANK = 1, // Wilcoxon signed rank
113  // param1 - number of observations in the sample
114  // param2 - not used
115  // param3 - not used
116 
117  LOGISTIC = 2, // Logistic
118  // param1 - location parameter (usually 0)
119  // param2 - scale parameter (usually 1)
120  // param3 - not used
121 
122  WEIBULL = 3, // Weibull
123  // param1 - shape parameter
124  // param2 - scale parameter (usually 1)
125  // param3 - not used
126 
127  POISSON = 4, // Poisson
128  // param1 - lambda mean
129  // param2 - not used
130  // param3 - not used
131 
132  NEGBINOMIAL = 5, // Negative Binomial
133  // param1 - Dispersion parameter, or number of successful trials
134  // param2 - Probability of success on each trial
135  // param3 - not used
136 
137  HYPERGEOM = 6, // Hyper Geometric
138  // param1 - number of white balls in the urn
139  // param2 - number of black balls in the urn
140  // param3 - number of balls drawn from the urn
141 
142  GEOM = 7, // Geometric
143  // param1 - rate parameter
144  // param2 - not used
145  // param3 - not used
146 
147  EXP = 8, // Exponential
148  // param1 - rate parameter
149  // param2 - not used
150  // param3 - not used
151 
152  CAUCHY = 9, // Cauchy
153  // param1 - location parameter (usually 0)
154  // param2 - scale parameter (usually 1)
155  // param3 - not used
156 
157  T = 10, // Student T
158  // param1 - degrees of freedom
159  // param2 - not used
160  // param3 - not used
161 
162  F = 11, // F
163  // param1 - degrees of freedom one
164  // param2 - degrees of freedom two
165  // param3 - not used
166 
167  LOGNORMAL = 12, // Log-normal
168  // param1 - log mean
169  // param2 - log standard deviation
170  // param3 - not used
171 
172  GAMMA = 13, // Gamma
173  // param1 - shape parameter
174  // param2 - scale parameter
175  // param3 - not used
176 
177  UNIF = 14, // Uniform
178  // param1 - distribution lower limit
179  // param2 - distribution upper limit
180  // param3 - not used
181 
182  BETA = 15, // Beta
183  // param1 - shape parameter one.
184  // param2 - shape parameter two.
185  // param3 - not used
186 
187  BINOMIAL = 16, // Binomial
188  // param1 - number of trials
189  // param2 - probability of success on each trial
190  // param3 - not used
191 
192  NORMAL = 17, // Normal (Gaussian)
193  // param1 - mean
194  // param2 - standard deviation
195  // param3 - not used
196 
197  CHISQUARE = 18, // Chi-square
198  // param1 - degrees of freedom
199  // param2 - not used
200  // param3 - not used
201 
202  } StatDistType;
203 
213  void SetStatisticalDistributionForColumn(vtkRRandomTableSource::StatDistType t,
214  double param1,
215  double param2,
216  double param3,
217  const char* ColumnName,
218  int column_index);
219 
223  void SetStatisticalDistributionForColumn(int StatDistType,
224  double param1,
225  double param2,
226  double param3,
227  const char* ColumnName,
228  int column_index);
229 
230 
231 protected:
234 
235  int RequestData(
239 
240 private:
241  vtkRRandomTableSource(const vtkRRandomTableSource&) VTK_DELETE_FUNCTION;
242  void operator=(const vtkRRandomTableSource&) VTK_DELETE_FUNCTION;
243 
244  int NumberOfRows;
245 
246  vtkRrtsimplementation *impl;
247 
248 };
249 
250 #endif
251 
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
a simple class to control print indentation
Definition: vtkIndent.h:39
Generates vtkTables with columns of random numbers using Gnu R.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Superclass for algorithms that produce only vtkTables as output.
StatDistType
Available statistical distribution output types.
Store zero or more vtkInformation instances.