npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::HistoNDCdf Class Reference

#include <HistoNDCdf.hh>

Public Member Functions

template<typename Numeric >
 HistoNDCdf (const HistoND< Numeric > &histo, const double *iniScales, const unsigned lenScales, const double eps=1.0e-12)
 
unsigned dim () const
 
BoxND< double > boundingBox () const
 
double cdf (const double *x, unsigned dim) const
 
double boxCoverage (const BoxND< double > &box) const
 
void coveringBox (double coveredFraction, const double *boxCenter, unsigned dimCenter, BoxND< double > *coverBox) const
 

Detailed Description

Multivariate cumulative density for a histogram of some scalar type. This class is mainly useful for its ability to come up with boxes that cover a certain predefined fraction of the distribution.

Constructor & Destructor Documentation

◆ HistoNDCdf()

template<typename Numeric >
npstat::HistoNDCdf::HistoNDCdf ( const HistoND< Numeric > &  histo,
const double *  iniScales,
const unsigned  lenScales,
const double  eps = 1.0e-12 
)
inline

The argument histogram can not have negative bins and also can not be empty

The "iniScales" parameter in the following constructor specifies the proportions for the sides of the boxes which will be returned by the "coveringBox" method. For example, if for a 3-d histogram these proportions are 1, 2, and 3 then the sides of the returned boxes will be two times longer in the second dimension in comparison with the first dimension, and three times longer in the third dimension. All scales must be positive.

The "eps" parameter specifies the tolerance within which the sizes of the boxes returned by the "coveringBox" method will be calculated. Their linear sizes will be within the factor (1 +- eps) of the correct ones. Naturally, this number must be larger than DBL_EPSILON.

Member Function Documentation

◆ boundingBox()

BoxND<double> npstat::HistoNDCdf::boundingBox ( ) const

Bounding box of the histogram from which this object was created

◆ boxCoverage()

double npstat::HistoNDCdf::boxCoverage ( const BoxND< double > &  box) const

Fraction of the distribution inside the given box

◆ cdf()

double npstat::HistoNDCdf::cdf ( const double *  x,
unsigned  dim 
) const

Multivariate cumulative density function

◆ coveringBox()

void npstat::HistoNDCdf::coveringBox ( double  coveredFraction,
const double *  boxCenter,
unsigned  dimCenter,
BoxND< double > *  coverBox 
) const

The box that is centered at the given position and covers the given fraction of the distribution

◆ dim()

unsigned npstat::HistoNDCdf::dim ( ) const
inline

Histogram dimensionality


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