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 
52 #ifndef vtkRRandomTableSource_h
53 #define vtkRRandomTableSource_h
54 
55 #include "vtkFiltersStatisticsGnuRModule.h" // For export macro
56 #include "vtkTableAlgorithm.h"
57 
58 class vtkRrtsimplementation;
59 
60 class VTKFILTERSSTATISTICSGNUR_EXPORT vtkRRandomTableSource : public vtkTableAlgorithm
61 {
62 
63 public:
64 
65  static vtkRRandomTableSource* New();
67  void PrintSelf(ostream& os, vtkIndent indent);
68 
70 
73  void SetNumberOfRows(int nrows);
74  int GetNumberOfRows();
76 
80  int GetNumberOfColumns();
81 
86  void ClearTableOutput();
87 
92  void SetRandGenSeed(const int seed);
93 
98  typedef enum
99  {
100 
101  WILCOXONRANKSUM = 0, // Wilcoxon rank sum
102  // param1 - number of observations in the first sample
103  // param2 - number of observations in the second sample
104  // param3 - not used
105 
106  WILCOXONSIGNEDRANK = 1, // Wilcoxon signed rank
107  // param1 - number of observations in the sample
108  // param2 - not used
109  // param3 - not used
110 
111  LOGISTIC = 2, // Logistic
112  // param1 - location parameter (usually 0)
113  // param2 - scale parameter (usually 1)
114  // param3 - not used
115 
116  WEIBULL = 3, // Weibull
117  // param1 - shape parameter
118  // param2 - scale parameter (usually 1)
119  // param3 - not used
120 
121  POISSON = 4, // Poisson
122  // param1 - lambda mean
123  // param2 - not used
124  // param3 - not used
125 
126  NEGBINOMIAL = 5, // Negative Binomial
127  // param1 - Dispersion parameter, or number of successful trials
128  // param2 - Probability of success on each trial
129  // param3 - not used
130 
131  HYPERGEOM = 6, // Hyper Geometric
132  // param1 - number of white balls in the urn
133  // param2 - number of black balls in the urn
134  // param3 - number of balls drawn from the urn
135 
136  GEOM = 7, // Geometric
137  // param1 - rate parameter
138  // param2 - not used
139  // param3 - not used
140 
141  EXP = 8, // Exponential
142  // param1 - rate parameter
143  // param2 - not used
144  // param3 - not used
145 
146  CAUCHY = 9, // Cauchy
147  // param1 - location parameter (usually 0)
148  // param2 - scale parameter (usually 1)
149  // param3 - not used
150 
151  T = 10, // Student T
152  // param1 - degrees of freedom
153  // param2 - not used
154  // param3 - not used
155 
156  F = 11, // F
157  // param1 - degrees of freedom one
158  // param2 - degrees of freedom two
159  // param3 - not used
160 
161  LOGNORMAL = 12, // Log-normal
162  // param1 - log mean
163  // param2 - log standard deviation
164  // param3 - not used
165 
166  GAMMA = 13, // Gamma
167  // param1 - shape parameter
168  // param2 - scale parameter
169  // param3 - not used
170 
171  UNIF = 14, // Uniform
172  // param1 - distribution lower limit
173  // param2 - distribution upper limit
174  // param3 - not used
175 
176  BETA = 15, // Beta
177  // param1 - shape parameter one.
178  // param2 - shape parameter two.
179  // param3 - not used
180 
181  BINOMIAL = 16, // Binomial
182  // param1 - number of trials
183  // param2 - probability of success on each trial
184  // param3 - not used
185 
186  NORMAL = 17, // Normal (Gaussian)
187  // param1 - mean
188  // param2 - standard deviation
189  // param3 - not used
190 
191  CHISQUARE = 18, // Chi-square
192  // param1 - degrees of freedom
193  // param2 - not used
194  // param3 - not used
195 
196  } StatDistType;
197 
207  void SetStatisticalDistributionForColumn(vtkRRandomTableSource::StatDistType t,
208  double param1,
209  double param2,
210  double param3,
211  const char* ColumnName,
212  int column_index);
213 
217  void SetStatisticalDistributionForColumn(int StatDistType,
218  double param1,
219  double param2,
220  double param3,
221  const char* ColumnName,
222  int column_index);
223 
224 
225 protected:
228 
229  int RequestData(
233 
234 private:
235  vtkRRandomTableSource(const vtkRRandomTableSource&) VTK_DELETE_FUNCTION;
236  void operator=(const vtkRRandomTableSource&) VTK_DELETE_FUNCTION;
237 
238  int NumberOfRows;
239 
240  vtkRrtsimplementation *impl;
241 
242 };
243 
244 #endif
245 
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:33
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.