|
Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
|
Piecewise Gaussian marginal with asymmetric widths. More...
#include <SplitGaussianMarginal.h>


Public Member Functions | |
| SplitGaussianMarginal (double mu, double sigma_p, double sigma_m, unsigned int seed=std::random_device{}()) | |
| Constructs an asymmetric split-Gaussian marginal. | |
| 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. | |
| PDFDiff | f_df_ddf (double x) override |
| double | cdf (double x) override |
Evaluates the cumulative distribution function at x. | |
| double | ppf (double p) override |
| Evaluates the quantile function (inverse CDF). | |
| double | mean () override |
| Returns the mean of the distribution. | |
| double | std () override |
| Returns the standard deviation of the distribution. | |
Public Member Functions inherited from IMarginalDistribution | |
| virtual | ~IMarginalDistribution ()=default |
| virtual Vector | sample (std::size_t n)=0 |
| virtual | ~IMarginalDistribution ()=default |
| Virtual destructor for safe polymorphic deletion. | |
Piecewise Gaussian marginal with asymmetric widths.
This class represents a split normal / two-piece Gaussian distribution:
The distribution is normalized through:
Sampling is currently implemented by inverse transform: a uniform random number is drawn and passed through ppf.
Definition at line 54 of file SplitGaussianMarginal.h.
|
explicit |
Constructs an asymmetric split-Gaussian marginal.
| mu | Central value / mode. |
| sigma_p | Right-side width. |
| sigma_m | Left-side width. |
| seed | Seed for the internal RNG. |
Definition at line 3 of file SplitGaussianMarginal.cpp.
|
overridevirtual |
Evaluates the cumulative distribution function at x.
| x | Point at which the CDF is evaluated. |

Implements IMarginalDistribution.
Definition at line 35 of file SplitGaussianMarginal.cpp.
|
overridevirtual |
Implements IMarginalDistribution.
Definition at line 25 of file SplitGaussianMarginal.cpp.
|
overridevirtual |
Evaluates the logarithm of the probability density at x.
For continuous distributions, this is usually 
| x | Point at which the log-density is evaluated. |
Implements IMarginalDistribution.
Definition at line 19 of file SplitGaussianMarginal.cpp.
|
overridevirtual |
Returns the mean of the distribution.
Implements IMarginalDistribution.
Definition at line 55 of file SplitGaussianMarginal.cpp.
|
overridevirtual |
Evaluates the quantile function (inverse CDF).
| x | Probability in the unit interval. |
x. Implements IMarginalDistribution.
Definition at line 43 of file SplitGaussianMarginal.cpp.
|
overridevirtual |
Draws random samples from the marginal distribution.
| n | Number of samples to generate. |
n containing iid draws. Implements IMarginalDistribution.
Definition at line 12 of file SplitGaussianMarginal.cpp.
|
overridevirtual |
Returns the standard deviation of the distribution.
Implements IMarginalDistribution.
Definition at line 59 of file SplitGaussianMarginal.cpp.