Hyperiso 1.0.3
Modular flavour-physics calculations, Wilson coefficients and statistical inference
Loading...
Searching...
No Matches
IMarginalDistribution.h
Go to the documentation of this file.
1#ifndef IDISTRIBUTION_H
2#define IDISTRIBUTION_H
3
4#include <gsl/gsl_randist.h>
5#include <gsl/gsl_cdf.h>
6#include <gsl/gsl_rng.h>
7
8struct PDFDiff {
9 double f;
10 double df;
11 double ddf;
12};
13
62 virtual ~IMarginalDistribution() = default;
63
70 virtual std::vector<double> rvs(std::size_t n) = 0;
71
82 virtual double logpdf(double x) = 0;
83
84 virtual PDFDiff f_df_ddf(double x) = 0;
85
92 virtual double cdf(double x) = 0;
93
100 virtual double ppf(double x) = 0;
101
107 virtual double mean() = 0;
108
114 virtual double std() = 0;
115};
116
117#endif
Abstract interface for scalar marginal distributions.
virtual PDFDiff f_df_ddf(double x)=0
virtual double cdf(double x)=0
Evaluates the cumulative distribution function at x.
virtual double ppf(double x)=0
Evaluates the quantile function (inverse CDF).
virtual double logpdf(double x)=0
Evaluates the logarithm of the probability density at x.
virtual std::vector< double > rvs(std::size_t n)=0
Draws random samples from the marginal distribution.
virtual ~IMarginalDistribution()=default
Virtual destructor for safe polymorphic deletion.
virtual double mean()=0
Returns the mean of the distribution.
virtual double std()=0
Returns the standard deviation of the distribution.