|
| | CenteredAsymmetricLaplaceRand (double scale=1, double asymmetry=1) |
| |
| std::string | Name () const override |
| |
| DoublePair | SufficientStatistic (RealType x) const override |
| | Sufficient statistic (max(x, 0), max(-x, 0)) with natural parameters (-κ/γ, -1/(γκ))
|
| |
| DoublePair | SourceParameters () const override |
| |
| DoublePair | SourceToNatural (DoublePair sourceParameters) const override |
| |
| double | LogNormalizer (DoublePair theta) const override |
| |
| DoublePair | LogNormalizerGradient (DoublePair theta) const override |
| |
| double | CarrierMeasure (RealType) const override |
| |
Public Member Functions inherited from randlib::AsymmetricLaplaceDistribution< RealType > |
| | AsymmetricLaplaceDistribution (double shift=0, double scale=1, double asymmetry=1) |
| |
| void | SetScale (double scale) |
| |
| double | GetAsymmetry () const noexcept |
| |
| double | f (const RealType &x) const override |
| |
| double | logf (const RealType &x) const override |
| |
| double | F (const RealType &x) const override |
| |
| double | S (const RealType &x) const override |
| |
| template<std::uniform_random_bit_generator G> |
| RealType | operator() (G &g) const |
| |
| long double | Entropy () const |
| |
| void | FitScale (std::span< const RealType > sample) |
| |
Public Member Functions inherited from randlib::GeneralGeometricStableDistribution< RealType > |
| virtual | ~GeneralGeometricStableDistribution () |
| |
| double | GetExponent () const noexcept |
| |
| double | GetSkewness () const noexcept |
| |
| double | GetScale () const noexcept |
| |
| double | GetLogScale () const noexcept |
| |
| Support | SupportType () const override |
| |
| RealType | MinValue () const override |
| |
| RealType | MaxValue () const override |
| |
| double | f (const RealType &x) const override |
| |
| double | logf (const RealType &x) const override |
| |
| double | F (const RealType &x) const override |
| |
| template<std::uniform_random_bit_generator G> |
| RealType | operator() (G &g) const |
| |
| long double | Mean () const override |
| |
| long double | Variance () const override |
| |
| RealType | Median () const override |
| |
| RealType | Mode () const override |
| | Mode is the value, which has the largest probability to happen, or, in the case of continuous distribution, has the largest value of density function.
|
| |
| long double | Skewness () const override |
| |
| long double | ExcessKurtosis () const override |
| |
Public Member Functions inherited from randlib::ContinuousDistribution< RealType > |
| virtual | ~ContinuousDistribution () |
| |
| void | ProbabilityDensityFunction (std::span< const RealType > x, std::span< double > y) const |
| | fill vector y with f(x)
|
| |
| void | LogProbabilityDensityFunction (std::span< const RealType > x, std::span< double > y) const |
| | fill vector y with logf(x)
|
| |
| double | Hazard (const RealType &x) const override |
| |
| double | LikelihoodFunction (std::span< const RealType > sample) const override |
| |
| double | LogLikelihoodFunction (std::span< const RealType > sample) const override |
| |
| bool | KolmogorovSmirnovTest (std::span< const RealType > orderStatistic, double alpha) const |
| |
Public Member Functions inherited from randlib::UnivariateDistribution< RealType > |
| virtual | ~UnivariateDistribution () |
| |
| bool | isLeftBounded () const |
| |
| bool | isRightBounded () const |
| |
| RealType | Quantile (double p) const |
| |
| RealType | Quantile1m (double p) const |
| |
| void | QuantileFunction (std::span< const double > p, std::span< RealType > y) const |
| |
| void | QuantileFunction1m (std::span< const double > p, std::span< RealType > y) const |
| |
| std::complex< double > | CF (double t) const |
| |
| void | CharacteristicFunction (std::span< const double > t, std::span< std::complex< double > > y) const |
| |
| void | HazardFunction (std::span< const RealType > x, std::span< double > y) const |
| |
| virtual long double | Kurtosis () const |
| |
| virtual long double | SecondMoment () const |
| |
| virtual long double | ThirdMoment () const |
| |
| virtual long double | FourthMoment () const |
| |
Public Member Functions inherited from randlib::ProbabilityDistribution< T > |
| virtual | ~ProbabilityDistribution ()=default |
| |
| virtual double | F (const T &x) const =0 |
| |
| void | CumulativeDistributionFunction (std::span< const T > x, std::span< double > y) const |
| |
| virtual double | S (const T &x) const |
| |
| void | SurvivalFunction (std::span< const T > x, std::span< double > y) const |
| |
| template<std::uniform_random_bit_generator G> |
| T | operator() (G &g) const |
| | Draws a variate with the given engine through the virtual interface.
|
| |
| 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< T > outputData) const |
| | Fills the output with variates drawn with the engine of this object.
|
| |
| template<std::uniform_random_bit_generator G> |
| void | Sample (G &g, std::span< T > outputData) const |
| | Fills the output with variates drawn with the given engine.
|
| |
| void | Reseed (std::uint64_t seed) |
| |
Public Member Functions inherited from randlib::ExponentialFamily< RealType, DoublePair > |
| | ExponentialFamily () |
| |
| virtual | ~ExponentialFamily () |
| |
| virtual DoublePair | NaturalParameters () const |
| |
| double | ProbabilityMeasure (RealType x) const |
| |
| double | LogProbabilityMeasure (RealType x) const |
| |
| double | KullbackLeiblerDivergence (DoublePair parameters) const |
| |
| virtual double | CrossEntropyAdjusted (DoublePair parameters) const |
| |
| virtual double | EntropyAdjusted () const |
| |
|
Public Types inherited from randlib::ProbabilityDistribution< T > |
| using | value_type = T |
| |
Static Public Member Functions inherited from randlib::UnivariateDistribution< RealType > |
| static long double | GetSampleSum (std::span< const RealType > sample) |
| |
| static long double | GetSampleMean (std::span< const RealType > sample) |
| |
| static long double | GetSampleLogMean (std::span< const RealType > sample) |
| |
| static long double | GetSampleVariance (std::span< const RealType > sample, double mean) |
| |
| static long double | GetSampleLogVariance (std::span< const RealType > sample, double logMean) |
| |
| static LongDoublePair | GetSampleMeanAndVariance (std::span< const RealType > sample) |
| |
| static LongDoublePair | GetSampleLogMeanAndVariance (std::span< const RealType > sample) |
| |
| static std::tuple< long double, long double, long double, long double > | GetSampleStatistics (std::span< const RealType > sample) |
| |
Protected Types inherited from randlib::GeneralGeometricStableDistribution< RealType > |
| enum | DISTRIBUTION_TYPE {
LAPLACE
, ASYMMETRIC_LAPLACE
, CAUCHY
, LEVY
,
UNITY_EXPONENT
, ONEHALF_EXPONENT
, GENERAL
} |
| |
Protected Member Functions inherited from randlib::AsymmetricLaplaceDistribution< RealType > |
| void | ChangeLocation () |
| |
Protected Member Functions inherited from randlib::GeneralGeometricStableDistribution< RealType > |
| | GeneralGeometricStableDistribution (double exponent, double skewness, double scale=1.0, double location=0.0, double shift=0.0) |
| | log(κ)
|
| |
| void | SetParameters (double exponent, double skewness, double scale=1.0, double location=0.0, double shift=0.) |
| |
| void | SetLocation (double location) |
| |
| void | SetShift (double shift) |
| |
| void | SetScale (double scale) |
| |
| void | SetAsymmetry (double asymmetry) |
| |
| double | pdfLaplace (double x) const |
| |
| double | logpdfLaplace (double x) const |
| |
| double | cdfLaplace (double x) const |
| |
| double | cdfLaplaceCompl (double x) const |
| |
| RealType | quantileLaplace (double p) const |
| |
| RealType | quantileLaplace1m (double p) const |
| |
| RealType | searchTailQuantile (double p, bool upperTail) const |
| | Quantile search that starts far tails from their power-law asymptote.
|
| |
| RealType | quantileImpl (double p) const override |
| |
| RealType | quantileImpl1m (double p) const override |
| |
| std::complex< double > | CFImpl (double t) const override |
| |
Protected Member Functions inherited from randlib::ContinuousDistribution< RealType > |
| | ContinuousDistribution () |
| |
| std::complex< double > | integrateCharacteristicFunction (double t) const |
| |
| RealType | quantileImpl (double p, RealType initValue) const override |
| |
| RealType | quantileImpl1m (double p, RealType initValue) const override |
| |
| long double | ExpectedValue (const std::function< double(RealType)> &funPtr, RealType minPoint, RealType maxPoint) const override |
| |
| RealType | searchQuantile (double p, bool upperTail, RealType guess, double relativeStep=1e-3) const |
| | Deterministic root search for the quantile: brackets the root, starting from the guess when it is finite, then refines it with the Illinois variant of regula falsi (on a logarithmic scale for small p), falling back to bisection whenever the bracket does not halve.
|
| |
Protected Member Functions inherited from randlib::UnivariateDistribution< RealType > |
| | UnivariateDistribution () |
| |
Protected Member Functions inherited from randlib::ProbabilityDistribution< 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< 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 |
| |
Static Protected Member Functions inherited from randlib::UnivariateDistribution< RealType > |
| static bool | allElementsAreNotGreaterThan (RealType value, std::span< const RealType > sample) |
| |
| static bool | allElementsAreNotSmallerThan (RealType value, std::span< const RealType > sample) |
| |
| static bool | allElementsAreNonNegative (std::span< const RealType > sample) |
| |
| static bool | allElementsArePositive (std::span< const RealType > sample) |
| |
Protected Attributes inherited from randlib::GeneralGeometricStableDistribution< RealType > |
| double | alpha = 2 |
| | characteristic exponent α
|
| |
| double | alphaInv = 0.5 |
| |
| double | beta = 0 |
| | 1/α
|
| |
| double | mu = 0 |
| | location μ
|
| |
| double | m = 0 |
| | shift m
|
| |
| double | gamma = randlib::consts::sqrt2 |
| | scale γ
|
| |
| double | logGamma = 0.5 * randlib::consts::ln2 |
| | log(γ)
|
| |
| double | kappa = 1 |
| | parameters for α = 2
|
| |
| double | kappaInv = 1 |
| | 1 / κ
|
| |
| double | kappaSq = 1 |
| | κ^2
|
| |
| double | log1pKappaSq = randlib::consts::ln2 |
| | log(1 + κ^2)
|
| |
| double | logKappa = 0 |
| |
| DISTRIBUTION_TYPE | distributionType = LAPLACE |
| | type of distribution (Laplace by default)
|
| |
Static Protected Attributes inherited from randlib::ProbabilityDistribution< T > |
| static constexpr size_t | MAX_ITER_REJECTION = detail::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 [] = "All elements should be positive" |
| |
| static constexpr char | NON_NEGATIVITY_VIOLATION [] = "All elements should be non-negative" |
| |
| static constexpr char | UPPER_LIMIT_VIOLATION [] = "No element should be greater than " |
| |
| static constexpr char | LOWER_LIMIT_VIOLATION [] = "No element should be smaller than " |
| |
template<typename RealType>
class randlib::CenteredAsymmetricLaplaceRand< RealType >
The CenteredAsymmetricLaplaceRand class
Centered Laplace distribution.
Belongs to exponential family