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 "vtkTableAlgorithm.h"
61 
62 class vtkRrtsimplementation;
63 
65 {
66 
67 public:
68 
69  static vtkRRandomTableSource* New();
71  void PrintSelf(ostream& os, vtkIndent indent);
72 
74 
75  void SetNumberOfRows(int nrows);
76  int GetNumberOfRows();
78 
80  int GetNumberOfColumns();
81 
84  void ClearTableOutput();
85 
88  void SetRandGenSeed(const int seed);
89 
90 //BTX
92 
95  typedef enum
96  {
98 
99  WILCOXONRANKSUM = 0, // Wilcoxon rank sum
100  // param1 - number of observations in the first sample
101  // param2 - number of observations in the second sample
102  // param3 - not used
103 
104  WILCOXONSIGNEDRANK = 1, // Wilcoxon signed rank
105  // param1 - number of observations in the sample
106  // param2 - not used
107  // param3 - not used
108 
109  LOGISTIC = 2, // Logistic
110  // param1 - location parameter (usually 0)
111  // param2 - scale parameter (usually 1)
112  // param3 - not used
113 
114  WEIBULL = 3, // Weibull
115  // param1 - shape parameter
116  // param2 - scale parameter (usually 1)
117  // param3 - not used
118 
119  POISSON = 4, // Poisson
120  // param1 - lambda mean
121  // param2 - not used
122  // param3 - not used
123 
124  NEGBINOMIAL = 5, // Negative Binomial
125  // param1 - Dispersion parameter, or number of successful trials
126  // param2 - Probability of success on each trial
127  // param3 - not used
128 
129  HYPERGEOM = 6, // Hyper Geometric
130  // param1 - number of white balls in the urn
131  // param2 - number of black balls in the urn
132  // param3 - number of balls drawn from the urn
133 
134  GEOM = 7, // Geometric
135  // param1 - rate parameter
136  // param2 - not used
137  // param3 - not used
138 
139  EXP = 8, // Exponential
140  // param1 - rate parameter
141  // param2 - not used
142  // param3 - not used
143 
144  CAUCHY = 9, // Cauchy
145  // param1 - location parameter (usually 0)
146  // param2 - scale parameter (usually 1)
147  // param3 - not used
148 
149  T = 10, // Student T
150  // param1 - degrees of freedom
151  // param2 - not used
152  // param3 - not used
153 
154  F = 11, // F
155  // param1 - degrees of freedom one
156  // param2 - degrees of freedom two
157  // param3 - not used
158 
159  LOGNORMAL = 12, // Log-normal
160  // param1 - log mean
161  // param2 - log standard deviation
162  // param3 - not used
163 
164  GAMMA = 13, // Gamma
165  // param1 - shape parameter
166  // param2 - scale parameter
167  // param3 - not used
168 
169  UNIF = 14, // Uniform
170  // param1 - distribution lower limit
171  // param2 - distribution upper limit
172  // param3 - not used
173 
174  BETA = 15, // Beta
175  // param1 - shape parameter one.
176  // param2 - shape parameter two.
177  // param3 - not used
178 
179  BINOMIAL = 16, // Binomial
180  // param1 - number of trials
181  // param2 - probability of success on each trial
182  // param3 - not used
183 
184  NORMAL = 17, // Normal (Gaussian)
185  // param1 - mean
186  // param2 - standard deviation
187  // param3 - not used
188 
189  CHISQUARE = 18, // Chi-square
190  // param1 - degrees of freedom
191  // param2 - not used
192  // param3 - not used
193 
194  } StatDistType;
195 
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 //ETX
215 
217 
219  void SetStatisticalDistributionForColumn(int StatDistType,
220  double param1,
221  double param2,
222  double param3,
223  const char* ColumnName,
224  int column_index);
226 
227 
228 protected:
231 
232  int RequestData(
233  vtkInformation*,
236 
237 private:
238  vtkRRandomTableSource(const vtkRRandomTableSource&); // Not implemented
239  void operator=(const vtkRRandomTableSource&); // Not implemented
240 
241  int NumberOfRows;
242 
243  vtkRrtsimplementation *impl;
244 
245 };
246 
247 #endif
248 
#define VTK_GRAPHICS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
a simple class to control print indentation
Definition: vtkIndent.h:37
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.