1#ifndef SPLITGAUSSIANMARGINAL_H
2#define SPLITGAUSSIANMARGINAL_H
27using gsl_rng_sptr = std::unique_ptr<gsl_rng,
decltype(&gsl_rng_free)>;
64 explicit SplitGaussianMarginal(
double mu,
double sigma_p,
double sigma_m,
unsigned int seed = std::random_device{}());
67 std::vector<double>
rvs(std::size_t n)
override;
70 double logpdf(
double x)
override;
75 double cdf(
double x)
override;
78 double ppf(
double p)
override;
81 double mean()
override;
84 double std()
override;
92 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.
std::unique_ptr< gsl_rng, decltype(&gsl_rng_free)> gsl_rng_sptr
Piecewise Gaussian marginal with asymmetric widths.
double logpdf(double x) override
Evaluates the logarithm of the probability density at x.
double cdf(double x) override
Evaluates the cumulative distribution function at x.
double std() override
Returns the standard deviation of the distribution.
double mean() override
Returns the mean of the distribution.
std::vector< double > rvs(std::size_t n) override
Draws random samples from the marginal distribution.
double ppf(double p) override
Evaluates the quantile function (inverse CDF).
PDFDiff f_df_ddf(double x) override
Polymorphic base class for configuration types.
Abstract interface for scalar marginal distributions.
Configuration object for SplitGaussianMarginal.
double sigma_p
Central value / mode.
double sigma_m
Standard deviation on the right side (x > mu).