npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0

#include <AbsDistribution1D.hh>

Inheritance diagram for npstat::AbsDistribution1D:
npstat::AbsInterpolatedDistribution1D npstat::AbsScalableDistribution1D npstat::ComparisonDistribution1D npstat::CompositeDistribution1D npstat::DistributionMix1D npstat::EdgeworthSeries1D npstat::ExpTiltedDistribution1D npstat::FoldedDistribution1D npstat::InterpolatedDistro1D1P npstat::InterpolatedDistro1DNP npstat::LeftCensoredDistribution npstat::ModulatedDistribution1D< Functor > npstat::RatioOfNormals npstat::RightCensoredDistribution npstat::TransformedDistribution1D npstat::TruncatedDistribution1D

Public Member Functions

virtual double density (double x) const =0
 
virtual double cdf (double x) const =0
 
virtual double exceedance (double x) const =0
 
virtual double quantile (double x) const =0
 
bool operator== (const AbsDistribution1D &r) const
 
bool operator!= (const AbsDistribution1D &r) const
 
virtual AbsDistribution1Dclone () const =0
 
virtual unsigned random (AbsRandomGenerator &g, double *generatedRandom) const
 
long double empiricalMoment (long double center, unsigned order, unsigned nIntegrationPoints=1024U, bool useFejerQuadrature=false) const
 
template<class Functor >
double expectation (const Functor &fcn, unsigned nIntegrationPoints=1024U, bool useFejerQuadrature=false) const
 
virtual gs::ClassId classId () const =0
 
virtual bool write (std::ostream &) const
 

Static Public Member Functions

static const char * classname ()
 
static unsigned version ()
 
static AbsDistribution1Dread (const gs::ClassId &id, std::istream &)
 

Protected Member Functions

virtual bool isEqual (const AbsDistribution1D &) const =0
 

Detailed Description

All classes derived from this base should have copy constructors (possibly automatic).

quantile(0.0) and quantile(1.0) should return the boundaries of the support interval.

Member Function Documentation

◆ cdf()

◆ classId()

virtual gs::ClassId npstat::AbsDistribution1D::classId ( ) const
pure virtual

◆ clone()

virtual AbsDistribution1D* npstat::AbsDistribution1D::clone ( ) const
pure virtual

"Virtual copy constructor"

Implemented in npstat::AbsInterpolatedDistribution1D, npstat::AbsScalableDistribution1D, npstat::VerticallyInterpolatedDistribution1D, npstat::UGaussConvolution1D, npstat::TruncatedDistribution1D, npstat::TransformedDistribution1D, npstat::RightCensoredDistribution, npstat::RatioOfNormals, npstat::QuantileTable1D, npstat::PowerRatio1D, npstat::PowerHalfCauchy1D, npstat::PolynomialDistro1D, npstat::ModulatedDistribution1D< Functor >, npstat::LocationScaleFamily1D, npstat::LegendreDistro1D, npstat::LeftCensoredDistribution, npstat::JohnsonSystem, npstat::JohnsonSb, npstat::JohnsonSu, npstat::InterpolatedDistro1DNP, npstat::InterpolatedDistro1D1P, npstat::InterpolatedDistribution1D, npstat::GaussianMixture1D, npstat::FoldedDistribution1D, npstat::ExpTiltedDistribution1D, npstat::EdgeworthSeries1D, npstat::BinnedDensity1D, npstat::Tabulated1D, npstat::StudentsT1D, npstat::Moyal1D, npstat::LogNormal, npstat::Cauchy1D, npstat::Huber1D, npstat::UniPareto1D, npstat::Pareto1D, npstat::Gamma1D, npstat::Beta1D, npstat::SymmetricBeta1D, npstat::BifurcatedGauss1D, npstat::MirroredGauss1D, npstat::TruncatedGauss1D, npstat::Gauss1D, npstat::LogQuadratic1D, npstat::Quadratic1D, npstat::Logistic1D, npstat::Laplace1D, npstat::Exponential1D, npstat::IsoscelesTriangle1D, npstat::Uniform1D, npstat::DistributionMix1D, npstat::DeltaMixture1D, npstat::JohnsonLadder, npstat::BinnedCompositeJohnson, npstat::LogQuadraticLadder, npstat::BetaGauss1D, npstat::CompositeGauss1D, npstat::CompositeDistribution1D, npstat::ComparisonDistribution1D, and npstat::ChebyshevDistro1D.

◆ density()

◆ empiricalMoment()

long double npstat::AbsDistribution1D::empiricalMoment ( long double  center,
unsigned  order,
unsigned  nIntegrationPoints = 1024U,
bool  useFejerQuadrature = false 
) const

Numerical moment calculation using Gauss-Legendre or Fejer quadrature. If "useFejerQuadrature" argument is set to "false", the number of integration points should be supported by the "GaussLegendreQuadrature" class.

No attempt is made to determine whether the moment actually exists. If it does not, the function might return Inf or fail in some other ways. This method might also be highly inaccurate for distributions with singularities or for distributions that have a lot of weight near support boundaries.

For better results, it might be useful to calculate the 0th order moment (i.e., the normalization factor for the quadrature scheme chosen) and then divide everything by it.

◆ exceedance()

◆ expectation()

template<class Functor >
double npstat::AbsDistribution1D::expectation ( const Functor &  fcn,
unsigned  nIntegrationPoints = 1024U,
bool  useFejerQuadrature = false 
) const

Numerical calculation of the expectation value of some functor, using Gauss-Legendre or Fejer quadrature. If "useFejerQuadrature" argument is set to "false", the number of integration points should be supported by the "GaussLegendreQuadrature" class.

◆ isEqual()

virtual bool npstat::AbsDistribution1D::isEqual ( const AbsDistribution1D ) const
protectedpure virtual

◆ operator!=()

bool npstat::AbsDistribution1D::operator!= ( const AbsDistribution1D r) const
inline

Logical negation of operator==

◆ operator==()

bool npstat::AbsDistribution1D::operator== ( const AbsDistribution1D r) const
inline

Derived classes should not implement "operator==", implement "isEqual" instead

◆ quantile()

◆ random()

virtual unsigned npstat::AbsDistribution1D::random ( AbsRandomGenerator g,
double *  generatedRandom 
) const
inlinevirtual

Random number generator according to the given distribution. Should return the number of random points used up from the generator.

Reimplemented in npstat::GaussianMixture1D, npstat::DistributionMix1D, npstat::RatioOfNormals, and npstat::AbsScalableDistribution1D.


The documentation for this struct was generated from the following file: