|
RandLib 2.0.0
Probability distributions, fitting, and heavy-tail tools for C++20
|
The NormalInverseGammaRand class
Normal-inverse-gamma distribution.
More...
#include <normal_inverse_gamma.hpp>


Public Member Functions | |
| NormalInverseGammaRand (double location=0, double precision=1, double shape=1, double rate=1) | |
| std::string | Name () const override |
| void | SetParameters (double location, double precision, double shape, double rate) |
| double | GetLocation () const noexcept |
| double | GetPrecision () const noexcept |
| double | GetShape () const noexcept |
| double | GetRate () const noexcept |
| double | f (const Pair< RealType > &point) const override |
| double | logf (const Pair< RealType > &point) const override |
| double | F (const Pair< RealType > &point) const override |
| template<std::uniform_random_bit_generator G> | |
| Pair< RealType > | operator() (G &g) const |
| long double | Correlation () const override |
| Pair< RealType > | Mode () const override |
Public Member Functions inherited from randlib::ContinuousBivariateDistribution< StudentTRand< RealType >, InverseGammaRand< RealType >, RealType > | |
| virtual | ~ContinuousBivariateDistribution () |
Public Member Functions inherited from randlib::BivariateDistribution< T1, T2, T > | |
| virtual | ~BivariateDistribution () |
| Pair< T > | MinValue () const override |
| Pair< T > | MaxValue () const override |
| virtual LongDoublePair | Mean () const final |
| virtual LongDoubleTriplet | Covariance () const final |
| virtual std::pair< T1, T2 > | GetMarginalDistributions () const final |
Public Member Functions inherited from randlib::ProbabilityDistribution< Pair< T > > | |
| virtual | ~ProbabilityDistribution ()=default |
| virtual double | F (const Pair< T > &x) const=0 |
| void | CumulativeDistributionFunction (std::span< const Pair< T > > x, std::span< double > y) const |
| virtual double | S (const Pair< T > &x) const |
| void | SurvivalFunction (std::span< const Pair< T > > x, std::span< double > y) const |
| Pair< T > | operator() (G &g) const |
| Draws a variate with the given engine through the virtual interface. | |
| Pair< T > | Variate () const |
| Uses the engine of this object, so it is not thread-safe for one object; use operator() with one engine per thread instead. | |
| void | Sample (std::span< Pair< T > > outputData) const |
| Fills the output with variates drawn with the engine of this object. | |
| void | Sample (G &g, std::span< Pair< T > > outputData) const |
| Fills the output with variates drawn with the given engine. | |
| void | Reseed (std::uint64_t seed) |
Additional Inherited Members | |
Public Types inherited from randlib::ProbabilityDistribution< Pair< T > > | |
| using | value_type = Pair< T > |
Protected Member Functions inherited from randlib::ContinuousBivariateDistribution< StudentTRand< RealType >, InverseGammaRand< RealType >, RealType > | |
| ContinuousBivariateDistribution () | |
Protected Member Functions inherited from randlib::BivariateDistribution< T1, T2, T > | |
| BivariateDistribution () | |
Protected Member Functions inherited from randlib::ProbabilityDistribution< Pair< T > > | |
| std::string | toStringWithPrecision (const double a_value, const int n=6) const |
| ProbabilityDistribution ()=default | |
| DefaultEngine & | engine () const |
| virtual void | sample (detail::EngineRef g, std::span< Pair< T > > outputData) const |
| Fills the output with variate(g); distributions with a faster bulk algorithm override it. | |
| fit_error | fitError (FitErrorCode code, const std::string &explanation) const |
Protected Attributes inherited from randlib::BivariateDistribution< T1, T2, T > | |
| T1 | X {} |
| 1st marginal distributions | |
| T2 | Y {} |
| 2nd marginal distributions | |
Static Protected Attributes inherited from randlib::ProbabilityDistribution< Pair< T > > | |
| static constexpr size_t | MAX_ITER_REJECTION |
| MAX_ITER_REJECTION upper boundary for maximum amount of iterations in rejection methods one thousand should be enough to be sure there is a bug (or rejection method is too slow to be used) | |
| static constexpr char | POSITIVITY_VIOLATION [] |
| static constexpr char | NON_NEGATIVITY_VIOLATION [] |
| static constexpr char | UPPER_LIMIT_VIOLATION [] |
| static constexpr char | LOWER_LIMIT_VIOLATION [] |
The NormalInverseGammaRand class
Normal-inverse-gamma distribution.
Notation: X ~ NIG(μ, λ, α, β)
| randlib::NormalInverseGammaRand< RealType >::NormalInverseGammaRand | ( | double | location = 0, |
| double | precision = 1, |
||
| double | shape = 1, |
||
| double | rate = 1 |
||
| ) |
|
overridevirtual |
Implements randlib::BivariateDistribution< T1, T2, T >.
|
overridevirtual |
|
override |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
overridevirtual |
|
overridevirtual |
Implements randlib::BivariateDistribution< T1, T2, T >.
|
overridevirtual |
Implements randlib::ProbabilityDistribution< Pair< T > >.
| Pair< RealType > randlib::NormalInverseGammaRand< RealType >::operator() | ( | G & | g | ) | const |
| void randlib::NormalInverseGammaRand< RealType >::SetParameters | ( | double | location, |
| double | precision, | ||
| double | shape, | ||
| double | rate | ||
| ) |