1#ifndef STANDARD_NORMAL_H
2#define STANDARD_NORMAL_H
26using gsl_rng_sptr = std::unique_ptr<gsl_rng,
decltype(&gsl_rng_free)>;
74 explicit GaussianMarginal(
double mu,
double sigma,
unsigned int seed = std::random_device{}());
77 std::vector<double>
rvs(std::size_t n)
override;
80 double logpdf(
double x)
override;
85 double cdf(
double x)
override;
88 double ppf(
double p)
override;
91 double mean()
override;
94 double std()
override;
98 const gsl_rng_type* rng_tp {gsl_rng_mt19937};
Base type for lightweight configuration structures.
std::unique_ptr< gsl_rng, decltype(&gsl_rng_free)> gsl_rng_sptr
Interface for one-dimensional marginal probability distributions.
One-dimensional Gaussian marginal distribution.
PDFDiff f_df_ddf(double x) override
double std() override
Returns the mean of the distribution.
double cdf(double x) override
Evaluates the cumulative distribution function at x.
double ppf(double p) override
Evaluates the quantile function (inverse CDF).
std::vector< double > rvs(std::size_t n) override
Draws random samples from the marginal distribution.
double logpdf(double x) override
Evaluates the logarithm of the probability density at x.
double mean() override
Returns the mean of the distribution.
Polymorphic base class for configuration types.
Configuration object for GaussianMarginal.
GaussianMarginalCfg(double mu, double sigma)
Constructs a Gaussian configuration.
double sigma
Mean of the Gaussian distribution.
GaussianMarginalCfg()=default
Standard deviation of the Gaussian distribution.
Abstract interface for scalar marginal distributions.