|
| double | logPDF (const double &x) const |
| | Computes the log probability density function (log-PDF) of the distribution.
|
| |
| double | dLogPDF (const double &x) const |
| | Computes the first derivative of the log-PDF.
|
| |
| double | ddLogPDF (const double &x) const |
| | Computes the second derivative of the log-PDF.
|
| |
| double | CDF (const double &x) const |
| | Computes the cumulative distribution function (CDF).
|
| |
| double | quantile (const double &p) const |
| | Computes the quantile function (inverse CDF).
|
| |
| double | sample (std::default_random_engine &rng) |
| | Draws a single pseudo-random sample from the distribution.
|
| |
template<typename Derived>
class cmp::distribution::UnivariateDistribution< Derived >
CRTP base class for all univariate probability distributions.
Mathematical Formulation Defines a probability distribution over a scalar random variable \(X \in \mathbb{R}\) with probability density function \(p(x)\). Provides static polymorphic interfaces for:
- Log-likelihood: \(\log p(x)\)
- First-order score: \(\frac{d}{dx} \log p(x)\)
- Second-order Hessian: \(\frac{d^2}{dx^2} \log p(x)\)
- Cumulative distribution function (CDF): \(F(x) = \int_{-\infty}^x p(t) dt\)
Quantile function: \(F^{-1}(p)\) for \(p \in [0, 1]\)
Implementation Algorithm Uses the Curiously Recurring Template Pattern (CRTP) for compile-time devirtualization of statistical calls.