Doxygen
1.9.1
|
Functions | |
void | TasDREAM::applyUniformUpdate (std::vector< double > &x, double magnitude, std::function< double(void)> get_random01=tsgCoreUniform01) |
Add a correction to every entry in x, use uniform samples over (-magnitude, magnitude). More... | |
void | TasDREAM::applyGaussianUpdate (std::vector< double > &x, double magnitude, std::function< double(void)> get_random01=tsgCoreUniform01) |
Add a correction to every entry in x, sue Gaussian distribution with zero mean and standard deviation equal to magnitude. More... | |
void | TasDREAM::genUniformSamples (const std::vector< double > &lower, const std::vector< double > &upper, int num_samples, std::vector< double > &x, std::function< double(void)> get_random01=tsgCoreUniform01) |
Generate uniform random samples in the hypercube defined by lower and upper limits. More... | |
std::vector< double > | TasDREAM::genUniformSamples (const std::vector< double > &lower, const std::vector< double > &upper, int num_samples, std::function< double(void)> get_random01=tsgCoreUniform01) |
Overload that returns the vector. | |
void | TasDREAM::genGaussianSamples (const std::vector< double > &means, const std::vector< double > &deviations, int num_samples, std::vector< double > &x, std::function< double(void)> get_random01=tsgCoreUniform01) |
Generate standard normal samples with given means and standard deviations. More... | |
std::vector< double > | TasDREAM::genGaussianSamples (const std::vector< double > &means, const std::vector< double > &deviations, int num_samples, std::function< double(void)> get_random01=tsgCoreUniform01) |
Overload that returns the vector. | |
template<TypeDistribution distribution, TypeSamplingForm form = regform, typename... Params> | |
double | TasDREAM::getDensity (double x, Params... params) |
Returns the unscaled probability density of distribution (defined by params) at the point x. More... | |
Contains the analytic definitions of several probability distributions and algorithms to draw samples from several known distributions.
|
inline |
Add a correction to every entry in x, use uniform samples over (-magnitude, magnitude).
The function get_random01() returns random numbers distributed over (0, 1).
|
inline |
Add a correction to every entry in x, sue Gaussian distribution with zero mean and standard deviation equal to magnitude.
The function get_random01() returns random numbers distributed over (0, 1). Gaussian numbers are generated using the Box-Muller algorithm.
|
inline |
Generate uniform random samples in the hypercube defined by lower and upper limits.
The size of the lower and upper must match. The output vector x will be resized to match num_samples times upper.size(), and the values will be overwritten. The function get_random01() returns random numbers distributed over (0, 1).
|
inline |
Generate standard normal samples with given means and standard deviations.
Generate Gaussian (normal) vectors with given means and standard deviations. The means and deviations must have the same size. The function get_random01() returns random numbers distributed over (0, 1).
double TasDREAM::getDensity | ( | double | x, |
Params... | params | ||
) |
Returns the unscaled probability density of distribution (defined by params) at the point x.
Variadric template that defines different one dimensional probability density function. Each function is defined by the distribution type and a set of parameters params, but the densities are not normalized (this is not needed by the DREAM algorithm). Returns the value of the density function at x, but assumes x is in the domain, i.e., if the probability distribution is restricted to an interval no check is performed. For example, for uniform distribution over (a, b), the function will always return 1.
Both the regular and log-form of the density can be computed based on form.