#include "gstlearn_export.hpp"
#include "Matrix/MatrixSquareSymmetric.hpp"
#include "Basic/VectorNumT.hpp"
#include "Enum/ECov.hpp"
Functions | |
GSTLEARN_EXPORT void | law_set_old_style (bool style) |
GSTLEARN_EXPORT int | law_get_random_seed (void) |
GSTLEARN_EXPORT void | law_set_random_seed (int seed) |
GSTLEARN_EXPORT double | law_uniform (double mini=0., double maxi=1.) |
GSTLEARN_EXPORT int | law_int_uniform (int mini, int maxi) |
GSTLEARN_EXPORT double | law_gaussian (double mean=0., double sigma=1.) |
GSTLEARN_EXPORT double | law_exponential (double lambda=1.) |
GSTLEARN_EXPORT double | law_gamma (double alpha, double beta=1.) |
GSTLEARN_EXPORT double | law_df_poisson (int i, double parameter) |
GSTLEARN_EXPORT VectorDouble | law_df_poisson_vec (VectorInt is, double parameter) |
GSTLEARN_EXPORT int | law_poisson (double parameter) |
GSTLEARN_EXPORT double | law_stable_standard_agd (double alpha, double beta) |
GSTLEARN_EXPORT double | law_stable_standard_a1gd (double beta) |
GSTLEARN_EXPORT double | law_stable_standard_abgd (double alpha) |
GSTLEARN_EXPORT double | law_stable_a (double alpha, double beta, double gamma, double delta) |
GSTLEARN_EXPORT double | law_stable_a1 (double beta, double gamma, double delta) |
GSTLEARN_EXPORT double | law_stable (double alpha, double beta, double gamma, double delta) |
GSTLEARN_EXPORT int | law_binomial (int n, double p) |
GSTLEARN_EXPORT double | law_beta1 (double parameter1, double parameter2) |
GSTLEARN_EXPORT double | law_beta2 (double parameter1, double parameter2) |
GSTLEARN_EXPORT double | law_df_gaussian (double value) |
GSTLEARN_EXPORT double | law_dnorm (double value, double mean, double std) |
GSTLEARN_EXPORT double | law_cdf_gaussian (double value) |
GSTLEARN_EXPORT double | law_invcdf_gaussian (double value) |
GSTLEARN_EXPORT double | law_gaussian_between_bounds (double binf, double bsup) |
GSTLEARN_EXPORT double | law_df_bigaussian (VectorDouble &vect, VectorDouble &mean, MatrixSquareSymmetric &correl) |
GSTLEARN_EXPORT double | law_df_quadgaussian (VectorDouble &vect, MatrixSquareSymmetric &correl) |
GSTLEARN_EXPORT double | law_df_multigaussian (VectorDouble &vect, MatrixSquareSymmetric &correl) |
GSTLEARN_EXPORT VectorInt | law_random_path (int nech) |
GSTLEARN_EXPORT double * | law_exp_sample (double *tabin, int mode, int nvar, int nechin, int nechout, int niter, int nconst, double *consts, int seed, double percent) |
GSTLEARN_EXPORT int | sampleInteger (int minit, int maxi) |
GSTLEARN_EXPORT double law_beta1 | ( | double | parameter1, |
double | parameter2 | ||
) |
Generate random numbers according to a beta distribution (first kind)
[in] | parameter1 | first parameter of the beta distribution |
[in] | parameter2 | first parameter of the beta distribution |
GSTLEARN_EXPORT double law_beta2 | ( | double | parameter1, |
double | parameter2 | ||
) |
Generate random numbers according to a beta distribution (second kind)
[in] | parameter1 | first parameter of the beta distribution |
[in] | parameter2 | first parameter of the beta distribution |
GSTLEARN_EXPORT int law_binomial | ( | int | n, |
double | p | ||
) |
Generates a binomial value
[in] | n | Number of trials |
[in] | p | Event probability |
GSTLEARN_EXPORT double law_cdf_gaussian | ( | double | value | ) |
Cumulated density function of a gaussian distribution
[in] | value | raw value |
GSTLEARN_EXPORT double law_df_bigaussian | ( | VectorDouble & | vect, |
VectorDouble & | mean, | ||
MatrixSquareSymmetric & | correl | ||
) |
GSTLEARN_EXPORT double law_df_gaussian | ( | double | value | ) |
Density function of a gaussian distribution
[in] | value | raw value |
GSTLEARN_EXPORT double law_df_multigaussian | ( | VectorDouble & | vect, |
MatrixSquareSymmetric & | correl | ||
) |
Density function of a multigaussian distribution
[in] | vect | Array of values (Dimension = nvar) |
[in] | correl | Correlation matrix (Dimension: nvar*nvar) |
GSTLEARN_EXPORT double law_df_poisson | ( | int | i, |
double | parameter | ||
) |
GSTLEARN_EXPORT VectorDouble law_df_poisson_vec | ( | VectorInt | is, |
double | parameter | ||
) |
GSTLEARN_EXPORT double law_df_quadgaussian | ( | VectorDouble & | vect, |
MatrixSquareSymmetric & | correl | ||
) |
Density function of a quadrigaussian distribution
[in] | vect | Array of values (Dimension = nvar) |
[in] | correl | Correlation matrix (Dimension: nvar*nvar) |
GSTLEARN_EXPORT double law_dnorm | ( | double | value, |
double | mean, | ||
double | std | ||
) |
Density function of a (non-normalized) gaussian distribution
[in] | value | Raw value |
[in] | mean | Mean value |
[in] | std | Standard deviation |
GSTLEARN_EXPORT double* law_exp_sample | ( | double * | tabin, |
int | mode, | ||
int | nvar, | ||
int | nechin, | ||
int | nechout, | ||
int | niter, | ||
int | nconst, | ||
double * | consts, | ||
int | seed, | ||
double | percent | ||
) |
Sample a multivariate empirical distribution
[in] | tabin | Input array |
[in] | mode | Describes the way 'tabin' and 'tabout' are filled 1: by column; 2: by row |
[in] | nvar | Number of variables (input and output) |
[in] | nechin | Number of samples in the input array |
[in] | nechout | Number of created samples |
[in] | niter | Maximum number of iterations |
[in] | nconst | Number of constraints |
[in] | consts | Array of constraints (optional) (Dimension: nconst * (nvar+1)) This array is entered by line |
[in] | seed | Value for the seed generator |
[in] | percent | Dimension of the convolution kernel expressed as a percentage of the dispersion st. dev. Should be between 0 and 100 |
GSTLEARN_EXPORT double law_exponential | ( | double | lambda | ) |
Generate random numbers according to exponential distribution
[in] | lambda | Parameter of exponential distribution |
GSTLEARN_EXPORT double law_gamma | ( | double | alpha, |
double | beta | ||
) |
Generate random numbers according to a gamma distribution
[in] | alpha | parameter of the gamma distribution |
[in] | beta | Second parameter of the Gamma distribution |
GSTLEARN_EXPORT double law_gaussian | ( | double | mean, |
double | sigma | ||
) |
Generate random numbers according to a gaussian distribution
[in] | mean | Mean of the Normal Distribution |
[in] | sigma | Standard deviation of the Normal Distribution |
GSTLEARN_EXPORT double law_gaussian_between_bounds | ( | double | binf, |
double | bsup | ||
) |
Generates a gaussian value which lies in an interval
[in] | binf | lower bound of the interval |
[in] | bsup | upper bound of the interval |
GSTLEARN_EXPORT int law_get_random_seed | ( | void | ) |
read the seed for the random number generator
GSTLEARN_EXPORT int law_int_uniform | ( | int | mini, |
int | maxi | ||
) |
Draw an integer random number according to a uniform distribution
[in] | mini | minimum value |
[in] | maxi | maximum value |
GSTLEARN_EXPORT double law_invcdf_gaussian | ( | double | value | ) |
Inverse cumulated density function of a gaussian distribution
[in] | value | cumulative density |
GSTLEARN_EXPORT int law_poisson | ( | double | parameter | ) |
Generate random number according to a poisson distribution
[in] | parameter | parameter of the Poisson distribution |
GSTLEARN_EXPORT VectorInt law_random_path | ( | int | nech | ) |
Define a random path
[in] | nech | : Number of samples |
GSTLEARN_EXPORT void law_set_old_style | ( | bool | style | ) |
GSTLEARN_EXPORT void law_set_random_seed | ( | int | seed | ) |
Sets the seed for the random number generator
[in] | seed | the new value given to the seed |
GSTLEARN_EXPORT double law_stable | ( | double | alpha, |
double | beta, | ||
double | gamma, | ||
double | delta | ||
) |
Generate random numbers according to a stable distribution
[in] | alpha | value of the alpha parameter |
[in] | beta | value of the beta parameter |
[in] | gamma | value of the gamma parameter |
[in] | delta | value of the delta parameter |
GSTLEARN_EXPORT double law_stable_a | ( | double | alpha, |
double | beta, | ||
double | gamma, | ||
double | delta | ||
) |
Generate random numbers according to a stable distribution (alpha != 1)
[in] | alpha | value of the alpha parameter |
[in] | beta | value of the beta parameter |
[in] | gamma | value of the gamma parameter |
[in] | delta | value of the delta parameter |
GSTLEARN_EXPORT double law_stable_a1 | ( | double | beta, |
double | gamma, | ||
double | delta | ||
) |
Generate random numbers according to a stable distribution (alpha=1)
[in] | beta | value of the beta parameter |
[in] | gamma | value of the gamma parameter |
[in] | delta | value of the delta parameter |
GSTLEARN_EXPORT double law_stable_standard_a1gd | ( | double | beta | ) |
Generate random numbers according to a standard stable distribution (alpha=1)
[in] | beta | value of the beta parameter |
GSTLEARN_EXPORT double law_stable_standard_abgd | ( | double | alpha | ) |
Generate random numbers according to a standard stable distribution
[in] | alpha | value of the alpha parameter |
GSTLEARN_EXPORT double law_stable_standard_agd | ( | double | alpha, |
double | beta | ||
) |
Generate random numbers according to a standard stable distribution
[in] | alpha | value of the alpha parameter |
[in] | beta | value of the beta parameter |
GSTLEARN_EXPORT double law_uniform | ( | double | mini, |
double | maxi | ||
) |
Draw a random number according to a uniform distribution
[in] | mini | minimum value |
[in] | maxi | maximum value |
GSTLEARN_EXPORT int sampleInteger | ( | int | mini, |
int | maxi | ||
) |
Returns an integer sampled uniformly wihtin the interval [mini, maxi]
mini | Lower bound (included) |
maxi | Upper bound (included) |