virtual ~IMarginalDistribution ()=default
virtual Vector sample (std::size_t n)=0
virtual ~IMarginalDistribution ()=default
Virtual destructor for safe polymorphic deletion.
virtual std::vector< double > rvs (std::size_t n)=0
Draws random samples from the marginal distribution.
virtual double logpdf (double x)=0
Evaluates the logarithm of the probability density at x.
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 mean ()=0
Returns the mean of the distribution.
virtual double std ()=0
Returns the standard deviation of the distribution.
Abstract interface for scalar marginal distributions.
A marginal distribution represents a one-dimensional probability law for a nuisance parameter, observable, or latent variable.
Implementations should follow these conventions:
rvs returns independent samples,
logpdf returns the natural logarithm of the density (or mass proxy),
cdf returns ,
ppf returns the quantile associated with a probability,
mean and std return the first and second central-moment summary.
For distributions where some notions are not naturally defined (for example a discrete likelihood used only as a sampler), implementations should throw a documented exception rather than return a plausible placeholder value.
Definition at line 44 of file correlated_rng.cpp .
virtual double IMarginalDistribution::logpdf
(
double
x )
pure virtual
Evaluates the logarithm of the probability density at x.
For continuous distributions, this is usually . For discrete or sampler-only distributions, the exact semantics depend on the implementation.
Parameters
x Point at which the log-density is evaluated.
Returns Natural logarithm of the density (or implementation-defined proxy).
Implemented in FlatMarginal , GaussianMarginal , SplitGaussianMarginal , and LikelihoodMarginal .