VTK
|
Generates vtkTables with columns of random numbers using Gnu R. More...
#include <vtkRRandomTableSource.h>
Generates vtkTables with columns of random numbers using Gnu R.
Note - An installation of Gnu R is required to build and use this class.
vtkRRandomTableSource uses the Gnu R math C language API for statistical distributions to generate vtkTables with columns of random numbers selected from a chosen distribution. The available distributions are as follows:
Normal, Cauchy, F, Student T, Poisson, Chi-Square, Exponential, Binomial, Beta, Geometric, Uniform, Gamma, Log-Normal, Logistic, Hyper-Geometric, Weibull, Negative Binomial, Wilcox
The default output for the class is a table of one column with ten rows of random numbers chosen from a Normal distribution of mean 0.0 and standard deviation of 1.0.
Use SetNumberOfRows() to set the number of rows (random numbers) in the output table.
See comments for SetStatisticalDistributionForColumn() to set the distribution output for a particular column or all columns in the output table.
Definition at line 65 of file vtkRRandomTableSource.h.
Reimplemented from vtkTableAlgorithm.
Definition at line 71 of file vtkRRandomTableSource.h.
Available statistical distribution output types. Depending on the distribution type, up to three parameters (param1, param2, param3) must be specified when using SetStatisticalDistributionForColumn().
WILCOXONRANKSUM | |
WILCOXONSIGNEDRANK | |
LOGISTIC | |
WEIBULL | |
POISSON | |
NEGBINOMIAL | |
HYPERGEOM | |
GEOM | |
EXP | |
CAUCHY | |
T | |
F | |
LOGNORMAL | |
GAMMA | |
UNIF | |
BETA | |
BINOMIAL | |
NORMAL | |
CHISQUARE |
Definition at line 96 of file vtkRRandomTableSource.h.
vtkRRandomTableSource::vtkRRandomTableSource | ( | ) | [protected] |
vtkRRandomTableSource::~vtkRRandomTableSource | ( | ) | [protected] |
static vtkRRandomTableSource* vtkRRandomTableSource::New | ( | ) | [static] |
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkTableAlgorithm.
static int vtkRRandomTableSource::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkTableAlgorithm.
virtual int vtkRRandomTableSource::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkTableAlgorithm.
static vtkRRandomTableSource* vtkRRandomTableSource::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkTableAlgorithm.
virtual vtkObjectBase* vtkRRandomTableSource::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkTableAlgorithm.
Reimplemented from vtkTableAlgorithm.
void vtkRRandomTableSource::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkTableAlgorithm.
void vtkRRandomTableSource::SetNumberOfRows | ( | int | nrows | ) |
Set and Get the number of rows in the output table (random numbers).
Set and Get the number of rows in the output table (random numbers).
Returns number of columns in the output table.
Clears table output to zero output columns. Number of table rows is unchanged.
void vtkRRandomTableSource::SetRandGenSeed | ( | const int | seed | ) |
Set the random seed used by Gnu R to generate output. The default is to use the random seed provided by Gnu R based on the current time.
void vtkRRandomTableSource::SetStatisticalDistributionForColumn | ( | vtkRRandomTableSource::StatDistType | t, |
double | param1, | ||
double | param2, | ||
double | param3, | ||
const char * | ColumnName, | ||
int | column_index | ||
) |
Set the statistical distribution to generate random numbers for a particular column or all columns in the output table. Use the above documented distribution types, for example use vtkRRandomTableSource::Normal for a Normal distribution. Set unused parameter values to 0.0. For example, a Normal distribution uses only param1 and param2 as the mean and the standard deviation respectively. Set param3 to 0.0. If column_index equals the current number of columns in the output table, a new column will be added to the output table and initialized with the input distribution parameters.
void vtkRRandomTableSource::SetStatisticalDistributionForColumn | ( | int | StatDistType, |
double | param1, | ||
double | param2, | ||
double | param3, | ||
const char * | ColumnName, | ||
int | column_index | ||
) |
Python wrapped version of above method. Use integer equivalent of StatDistType.
int vtkRRandomTableSource::RequestData | ( | vtkInformation * | request, |
vtkInformationVector ** | inputVector, | ||
vtkInformationVector * | outputVector | ||
) | [protected, virtual] |
This is called by the superclass. This is the method you should override.
Reimplemented from vtkTableAlgorithm.