npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
npstat::ComparisonDensityFunctor1D Class Reference
Inheritance diagram for npstat::ComparisonDensityFunctor1D:
npstat::AbsTwoDistros1DFunctor npstat::Functor1< double, double >

Public Member Functions

 ComparisonDensityFunctor1D (const AbsDistribution1D &nullHypothesis, const AbsDistribution1D &alternative)
 
virtual double operator() (const double &x) const
 
double legendreCoeff (unsigned degree) const
 
void legendreSeriesCoeffs (double *coeffs, unsigned maxDeg) const
 
double trigCoeff (unsigned k, bool isCosine, unsigned nInteg) const
 
double cosCoeff (unsigned k, unsigned nInteg) const
 
- Public Member Functions inherited from npstat::AbsTwoDistros1DFunctor
 AbsTwoDistros1DFunctor (const AbsDistribution1D &nullHypothesis, const AbsDistribution1D &alternative)
 
 AbsTwoDistros1DFunctor (const AbsTwoDistros1DFunctor &)
 
AbsTwoDistros1DFunctoroperator= (const AbsTwoDistros1DFunctor &)
 

Additional Inherited Members

- Public Types inherited from npstat::Functor1< double, double >
typedef double result_type
 
typedef double first_argument_type
 
- Protected Attributes inherited from npstat::AbsTwoDistros1DFunctor
CPP11_auto_ptr< AbsDistribution1DnullPtr_
 
CPP11_auto_ptr< AbsDistribution1DaltPtr_
 

Member Function Documentation

◆ cosCoeff()

double npstat::ComparisonDensityFunctor1D::cosCoeff ( unsigned  k,
unsigned  nInteg 
) const

Coefficient of expansion of this function into cosine basis, that is, sqrt(2)*cos(k Pi x). The integration is performed using the rectangle integration rule, with nInteg intervals. nInteg should be substantially larger than k, something like 16*k should work reasonably well.

◆ legendreCoeff()

double npstat::ComparisonDensityFunctor1D::legendreCoeff ( unsigned  degree) const

Coefficient of expansion of this function into shifted Legendre polynomials (that is, Legendre polynomials orthonormal on [0, 1]).

◆ legendreSeriesCoeffs()

void npstat::ComparisonDensityFunctor1D::legendreSeriesCoeffs ( double *  coeffs,
unsigned  maxDeg 
) const

All coefficients of the Legendre polynomial expansion of the density, up to the degree requested. The array "coeffs" should have at least maxDeg+1 elements.

◆ trigCoeff()

double npstat::ComparisonDensityFunctor1D::trigCoeff ( unsigned  k,
bool  isCosine,
unsigned  nInteg 
) const

Coefficient of expansion of this function into trigonometric functions, that is, sqrt(2)*sin(2 k Pi x) and sqrt(2)*cos(2 k Pi x). The integration is performed using the rectangle integration rule, with nInteg intervals. nInteg should be substantially larger than k, something like 32*k should work reasonably well.


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