UQTk: Uncertainty Quantification Toolkit 3.1.5
|
Header for probability and random number generation- related tools. More...
#include "Array1D.h"
#include "Array2D.h"
#include "dsfmt_add.h"
#include "KCenterClustering.h"
#include "figtree_internal.h"
Go to the source code of this file.
Macros | |
#define | DSFMT_DO_NOT_USE_OLD_NAMES |
Functions | |
double | erff (const double x) |
An implementation of error function using incomplete gamma function. | |
double | inverf (double y0) |
Inverse error function, input scaled to [-1,1]. | |
double | invnormcdf (double y) |
Inverse of the CDF of the normal random variable, uses inverf. | |
double | normcdf (double y) |
Normal random variable CDF. | |
double | normcdfc (double y) |
Complementary function for normcdf. | |
void | generate_uniform (double *rvar, int ns, int nd, int zSeed) |
Generates a vector of i.i.d. uniform(0,1) random variable samples of size ns*nd, given integer seed. | |
void | generate_uniform (Array2D< double > &rvar, int zSeed) |
Generates a matrix of i.i.d. uniform(0,1) random variable samples, given integer seed. | |
void | generate_uniform (double *rvar, int ns, int nd, dsfmt_t *rnstate) |
Generates a vector of i.i.d. uniform(0,1) random variable samples of size ns*nd, given pointer to the state of current random number generator. | |
void | generate_uniform (Array2D< double > &rvar, dsfmt_t *rnstate) |
Generates a matrix of i.i.d. uniform(0,1) random variable samples, given pointer to the state of current random number generator. | |
void | generate_uniform_lhs (double *rvar, int ns, int nd, int zSeed) |
Generates a vector of i.i.d. uniform(0,1) random variable LHS samples of size ns*nd, given integer seed. | |
void | generate_uniform_lhs (Array2D< double > &rvar, int zSeed) |
Generates a matrix of i.i.d. uniform(0,1) random variable LHS samples, given integer seed. | |
void | generate_uniform_lhs (double *rvar, int ns, int nd, dsfmt_t *rnstate) |
Generates a vector of i.i.d. uniform(0,1) random variable LHS samples of size ns*nd, given pointer to the state of current random number generator. | |
void | generate_uniform_lhs (Array2D< double > &rvar, dsfmt_t *rnstate) |
Generates a matrix of i.i.d. uniform(0,1) random variable LHS samples, given pointer to the state of current random number generator. | |
void | generate_normal (Array2D< double > &rvar, int zSeed) |
Generates a matrix of i.i.d. normal(0,1) random variable samples. | |
void | generate_normal_lhs (Array2D< double > &rvar, int zSeed) |
Generates a matrix of i.i.d. normal(0,1) random variable LHS samples. | |
double | get_median (const Array1D< double > &data) |
Returns the median of a data array. | |
double | get_mean (const Array1D< double > &data) |
Returns the mean of a 1D data array. | |
double | get_mean (const Array2D< double > &data) |
Returns the mean of a 2D data array. | |
double | get_std (const Array1D< double > &data) |
Returns the std of a data array. | |
double | get_var (const Array1D< double > &data) |
Returns the std of a data array. | |
double | getMean_Variance (Array2D< double > &data_c, Array1D< double > &w, Array1D< double > &mean) |
Vector-mean and weighted variance. | |
void | getMean (Array2D< double > &data_c, Array1D< double > &mean) |
Vector mean, column by column. | |
void | getMean (Array2D< double > &data_c, Array1D< double > &mean, char *RC) |
Vector mean, either column by column for RC="C" or row by row for RC="R". | |
void | rperm (int n, int *a, dsfmt_t *rnstate) |
Random permutation of 0..n-1. | |
void | getPdf_figtree (Array2D< double > &source, Array2D< double > &target, Array1D< double > &sig, Array1D< double > &density, Array1D< double > &weight) |
KDE estimation of a PDF. | |
void | getPdf_cl (Array2D< double > &data, Array2D< double > &points, Array1D< double > &dens, int ncl, double sfac) |
Compute the PDF of data at the given points using given number of clusters (if ncl=0, then find the optimal cluster number) and a scale factor for the optimal bandwidth. | |
double | covariance (Array1D< double > &x1, Array1D< double > &x2, Array1D< double > ¶m, string covtype) |
Compute a few standard covariance functions C(x_1,x_2) | |
void | ihsU (Array2D< double > &rndnos, int dfac, dsfmt_t *rnstate) |
void | ihsU (int ns, int np, double *rndnos, int dfac, dsfmt_t *rnstate) |
void | ihsP (int ns, int np, int *rpos, int dfac, dsfmt_t *rnstate) |
void | distCorr (const Array2D< double > &spl, Array2D< double > &dCor) |
Compute distance correlation factors given a set of samples (no. of rows in spl) from a collection of random variables (no. of columns in spl). dCor(i,j), with i>j stores the distance correlation values between random variables i and j. | |
Header for probability and random number generation- related tools.
#define DSFMT_DO_NOT_USE_OLD_NAMES |
double covariance | ( | Array1D< double > & | x1, |
Array1D< double > & | x2, | ||
Array1D< double > & | param, | ||
string | covtype ) |
Compute a few standard covariance functions C(x_1,x_2)
Compute distance correlation factors given a set of samples (no. of rows in spl) from a collection of random variables (no. of columns in spl). dCor(i,j), with i>j stores the distance correlation values between random variables i and j.
double erff | ( | const double | x | ) |
An implementation of error function using incomplete gamma function.
void generate_normal | ( | Array2D< double > & | rvar, |
int | zSeed ) |
Generates a matrix of i.i.d. normal(0,1) random variable samples.
void generate_normal_lhs | ( | Array2D< double > & | rvar, |
int | zSeed ) |
Generates a matrix of i.i.d. normal(0,1) random variable LHS samples.
void generate_uniform | ( | Array2D< double > & | rvar, |
dsfmt_t * | rnstate ) |
Generates a matrix of i.i.d. uniform(0,1) random variable samples, given pointer to the state of current random number generator.
void generate_uniform | ( | Array2D< double > & | rvar, |
int | zSeed ) |
Generates a matrix of i.i.d. uniform(0,1) random variable samples, given integer seed.
void generate_uniform | ( | double * | rvar, |
int | ns, | ||
int | nd, | ||
dsfmt_t * | rnstate ) |
Generates a vector of i.i.d. uniform(0,1) random variable samples of size ns*nd, given pointer to the state of current random number generator.
void generate_uniform | ( | double * | rvar, |
int | ns, | ||
int | nd, | ||
int | zSeed ) |
Generates a vector of i.i.d. uniform(0,1) random variable samples of size ns*nd, given integer seed.
void generate_uniform_lhs | ( | Array2D< double > & | rvar, |
dsfmt_t * | rnstate ) |
Generates a matrix of i.i.d. uniform(0,1) random variable LHS samples, given pointer to the state of current random number generator.
void generate_uniform_lhs | ( | Array2D< double > & | rvar, |
int | zSeed ) |
Generates a matrix of i.i.d. uniform(0,1) random variable LHS samples, given integer seed.
void generate_uniform_lhs | ( | double * | rvar, |
int | ns, | ||
int | nd, | ||
dsfmt_t * | rnstate ) |
Generates a vector of i.i.d. uniform(0,1) random variable LHS samples of size ns*nd, given pointer to the state of current random number generator.
void generate_uniform_lhs | ( | double * | rvar, |
int | ns, | ||
int | nd, | ||
int | zSeed ) |
Generates a vector of i.i.d. uniform(0,1) random variable LHS samples of size ns*nd, given integer seed.
double get_mean | ( | const Array1D< double > & | data | ) |
Returns the mean of a 1D data array.
double get_mean | ( | const Array2D< double > & | data | ) |
Returns the mean of a 2D data array.
double get_median | ( | const Array1D< double > & | data | ) |
Returns the median of a data array.
double get_std | ( | const Array1D< double > & | data | ) |
Returns the std of a data array.
double get_var | ( | const Array1D< double > & | data | ) |
Returns the std of a data array.
Vector mean, column by column.
Vector mean, either column by column for RC="C" or row by row for RC="R".
double getMean_Variance | ( | Array2D< double > & | data_c, |
Array1D< double > & | w, | ||
Array1D< double > & | mean ) |
Vector-mean and weighted variance.
void getPdf_cl | ( | Array2D< double > & | data, |
Array2D< double > & | points, | ||
Array1D< double > & | dens, | ||
int | ncl, | ||
double | sfac ) |
Compute the PDF of data at the given points using given number of clusters (if ncl=0, then find the optimal cluster number) and a scale factor for the optimal bandwidth.
void getPdf_figtree | ( | Array2D< double > & | source, |
Array2D< double > & | target, | ||
Array1D< double > & | sig, | ||
Array1D< double > & | density, | ||
Array1D< double > & | weight ) |
KDE estimation of a PDF.
void ihsP | ( | int | ns, |
int | np, | ||
int * | rpos, | ||
int | dfac, | ||
dsfmt_t * | rnstate ) |
void ihsU | ( | Array2D< double > & | rndnos, |
int | dfac, | ||
dsfmt_t * | rnstate ) |
void ihsU | ( | int | ns, |
int | np, | ||
double * | rndnos, | ||
int | dfac, | ||
dsfmt_t * | rnstate ) |
double inverf | ( | double | y0 | ) |
Inverse error function, input scaled to [-1,1].
double invnormcdf | ( | double | y | ) |
Inverse of the CDF of the normal random variable, uses inverf.
double normcdf | ( | double | y | ) |
Normal random variable CDF.
double normcdfc | ( | double | y | ) |
Complementary function for normcdf.
void rperm | ( | int | n, |
int * | a, | ||
dsfmt_t * | rnstate ) |
Random permutation of 0..n-1.