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

#include <PolyFilterCollection1D.hh>

Public Member Functions

 PolyFilterCollection1D (const AbsScalableDistribution1D &distro, const double *taper, unsigned maxDegree, double binwidth, unsigned dataLen, const BoundaryHandling &bm)
 
unsigned dataLength () const
 
double binWidth () const
 
const BoundaryHandlingboundaryMethod () const
 
unsigned maxDegree () const
 
double taper (unsigned i) const
 
const LocalPolyFilter1DgetPolyFilter (double bandwidth)
 
template<typename Tin , typename Tout >
void filter (const double bandwidth, const Tin *in, const unsigned dataLen, Tout *out)
 
template<typename Tin , typename Tout >
void convolve (const double bandwidth, const Tin *in, const unsigned dataLen, Tout *out)
 

Detailed Description

Collection of LocalPolyFilter1D objects with different bandwidth values. Filters are stored internally after their corresponding bandwidth values are used for the first time.

This class is intended for use with bandwidth scans (for example, in cross-validation scenarios).

Constructor & Destructor Documentation

◆ PolyFilterCollection1D()

npstat::PolyFilterCollection1D::PolyFilterCollection1D ( const AbsScalableDistribution1D distro,
const double *  taper,
unsigned  maxDegree,
double  binwidth,
unsigned  dataLen,
const BoundaryHandling bm 
)

The constructor arguments are as follows:

distro – Weight function to use in building the filter.

taper – The taper function used to build the filter (can be NULL).

maxDegree – Maximum polynomial degree of the filter. If the taper array is provided, its length should be maxDegree + 1.

binwidth – Bin width used to bin the data.

dataLen – Expected length of the data array to filter.

bm – Method used to handle LOrPE weight at the boundary.

Member Function Documentation

◆ convolve()

template<typename Tin , typename Tout >
void npstat::PolyFilterCollection1D::convolve ( const double  bandwidth,
const Tin *  in,
const unsigned  dataLen,
Tout *  out 
)
inline

This filtering method calls the "convolve" method of LocalPolyFilter1D objects instead of their "filter" method

◆ dataLength()

unsigned npstat::PolyFilterCollection1D::dataLength ( ) const
inline

Inspect object properties

◆ filter()

template<typename Tin , typename Tout >
void npstat::PolyFilterCollection1D::filter ( const double  bandwidth,
const Tin *  in,
const unsigned  dataLen,
Tout *  out 
)
inline

The method which performs the filtering. "dataLen", which is the length of both "in" and "out" arrays, must be the same as the one provided in the constructor.

◆ getPolyFilter()

const LocalPolyFilter1D& npstat::PolyFilterCollection1D::getPolyFilter ( double  bandwidth)

Retrive the filter which corresponds to the given bandwidth. If such a filter does not exist yet, construct it first.


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