|
| | BaseDistribution (double p1, double p2) |
| double | p1 () const override |
| double | p2 () const override |
| virtual | ~Distribution ()=default |
| virtual bool | meanIsAffine () const |
| | Whether mean() is an affine function of the raw parameters (p1, p2) – i.e.
|
| virtual bool | isDiscrete () const |
| | Whether the family is discrete (integer-valued), so a point event X = c carries positive mass.
|
| virtual DistSupport | support () const =0 |
| | Natural support interval of X.
|
| virtual bool | integrationRange (double &lo, double &hi) const =0 |
| | Finite window [lo, hi] covering essentially all of X's mass, for numerical quadrature.
|
| virtual std::pair< double, double > | plotRange (double trunc_lo, double trunc_hi) const =0 |
| | Plot x-window given optional truncation bounds (±infinity means "unbounded on that side"); used by the SVG curve renderer.
|
| virtual double | sample (std::mt19937_64 &rng) const =0 |
| | Draw one sample using the shared MC generator.
|
| virtual std::optional< double > | quantile (double p) const |
| | Inverse CDF \(Q(p) = F^{-1}(p)\) for \(p \in (0, 1)\).
|
| virtual std::optional< double > | truncatedRawMoment (double lo, double hi, unsigned k) const |
| | Closed-form raw moment \(E[X^k \mid lo < X < hi]\) of the distribution truncated to [lo, hi] (±infinity for a semi-infinite side).
|
| virtual std::optional< std::vector< double > > | sampleTruncated (std::mt19937_64 &rng, double lo, double hi, unsigned n) const |
| | Draw n rejection-free samples of X conditioned on lo < X < hi (±infinity for a semi-infinite side).
|
| virtual std::optional< double > | iidOrderStatMean (std::size_t n, bool isMax) const |
| | Closed-form mean of the max / min of n i.i.d.
|
| virtual std::unique_ptr< Distribution > | affine (double a, double b) const =0 |
| | Closed-form location-scale transform a·X + b within the family.
|
| std::unique_ptr< Distribution > | scale (double c) const |
| | Closed-form c·X (affine with no offset).
|
| std::unique_ptr< Distribution > | negate () const |
| | Closed-form -X (affine with coefficient -1).
|
| virtual std::string | serialise () const =0 |
| | The on-disk gate_rv extra text encoding (e.g.
|
| virtual std::optional< double > | asDirac () const |
| | The point-mass value when the parameters make the distribution degenerate (a Dirac), std::nullopt for a proper distribution.
|
| virtual const DistributionFamily & | family () const =0 |
| | The family's interned registry descriptor.
|
| virtual double | mean () const =0 |
| | E[X].
|
| virtual double | variance () const =0 |
| | Var(X).
|
| virtual double | rawMoment (unsigned k) const =0 |
| | E[X^k].
|
| virtual double | pdf (double x) const =0 |
| | f(x); NaN if the family declines
|
| virtual double | cdf (double x) const =0 |
| | F(x); NaN if the family declines.
|
Base holding the two parameters; subclasses add closed forms.
Definition at line 163 of file DistributionCommon.h.