npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::AbsBinnedComparison1D Class Referenceabstract
Inheritance diagram for npstat::AbsBinnedComparison1D:
npstat::BinnedADTest1D npstat::BinnedKSTest1D npstat::PearsonsChiSquared

Public Member Functions

virtual const char * name () const =0
 
template<typename T1 , typename T2 >
void compare (const T1 *data, const T2 *reference, unsigned len, double *distance, double *pvalue) const
 

Static Protected Member Functions

static unsigned long realToULong (const long double d)
 
static double pvalueByPseudo (const AbsDiscreteDistribution1DDistance &c, AbsRandomGenerator &rng, const DiscreteTabulated1D &data, double dataSampleSize, const DiscreteTabulated1D &reference, double refSampleSize, double observedDistance, unsigned nPseudo)
 

Member Function Documentation

◆ compare()

template<typename T1 , typename T2 >
void npstat::AbsBinnedComparison1D::compare ( const T1 *  data,
const T2 *  reference,
unsigned  len,
double *  distance,
double *  pvalue 
) const

The comparison method interface. Pointers "distance" or "pvalue" can be NULL in which case the corresponding quantity does not have to be calculated. If it makes sense for a test to use a "reference" sample (e.g., exact density with no sampling uncertainty), this should be the second argument of the function.

If types T1 or T2 are not doubles, the corresponding arrays will be converted to doubles internally.

◆ name()

virtual const char* npstat::AbsBinnedComparison1D::name ( ) const
pure virtual

Printable name identifying the comparison method

Implemented in npstat::PearsonsChiSquared, npstat::BinnedKSTest1D, and npstat::BinnedADTest1D.


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