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

#include <SequentialPolyFilterND.hh>

Inheritance diagram for npstat::SequentialPolyFilterND:
npstat::AbsPolyFilterND

Public Member Functions

 SequentialPolyFilterND (const LocalPolyFilter1D **filters, unsigned nFilters, bool takeOwnership)
 
 SequentialPolyFilterND (const std::vector< AllSymbetaParams1D > &params)
 
 SequentialPolyFilterND (const SequentialPolyFilterND &)
 
SequentialPolyFilterNDoperator= (const SequentialPolyFilterND &)
 
bool operator== (const SequentialPolyFilterND &r) const
 
bool operator!= (const SequentialPolyFilterND &r) const
 
unsigned dim () const
 
bool takesOwnership () const
 
ArrayShape dataShape () const
 
const LocalPolyFilter1Dfilter (unsigned dimNumber) const
 
ArrayND< double > getFilter (const unsigned *index, unsigned lenIndex) const
 
Matrix< double > getFilterMatrix () const
 
template<class Triplet >
CPP11_auto_ptr< std::vector< Triplet > > sparseFilterTriplets () const
 
template<class Array >
bool isCompatible (const Array &in) const
 
double selfContribution (const unsigned *index, unsigned lenIndex) const
 
double linearSelfContribution (unsigned long index) const
 
template<class ArrIn , class ArrOut >
void filter (const ArrIn &in, ArrOut *out) const
 
template<class ArrIn , class ArrOut >
void convolve (const ArrIn &in, ArrOut *out) const
 
virtual gs::ClassId classId () const
 
virtual bool write (std::ostream &os) const
 

Static Public Member Functions

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

Detailed Description

This class performs local polynomial filtering in multiple dimensions by sequential application of one-dimensional filters

Constructor & Destructor Documentation

◆ SequentialPolyFilterND()

npstat::SequentialPolyFilterND::SequentialPolyFilterND ( const LocalPolyFilter1D **  filters,
unsigned  nFilters,
bool  takeOwnership 
)

Main constructor. The arguments are as follows:

filters – Array of pointers to LocalPolyFilter1D objects which will be used to perform filtering in each dimension. The filters should be compatible with the expected span of the data arrays.

nFilters – Number of elements in the "filters" array. Should be equal to the dimensionality of the data arrays which will be processed by the "filter" function.

takeOwnership – If this argument is set to "true", we will call the "delete" operator on each element of the "filters" array the destructor.

Member Function Documentation

◆ convolve()

template<class ArrIn , class ArrOut >
void npstat::SequentialPolyFilterND::convolve ( const ArrIn &  in,
ArrOut *  out 
) const

A diffent filtering method in which the shapes of the kernels are determined by the positions of the "sources" (i.e., sample points) instead of the positions at which the density (or response) is estimated. Note that elements of "out" array themselves are used as result accumulators.

◆ dataShape()

ArrayShape npstat::SequentialPolyFilterND::dataShape ( ) const
virtual

Required shape of the data array

Implements npstat::AbsPolyFilterND.

◆ dim()

unsigned npstat::SequentialPolyFilterND::dim ( ) const
inlinevirtual

Inspect object properties

Implements npstat::AbsPolyFilterND.

◆ filter() [1/2]

template<class ArrIn , class ArrOut >
void npstat::SequentialPolyFilterND::filter ( const ArrIn &  in,
ArrOut *  out 
) const

This method performs the filtering

◆ filter() [2/2]

const LocalPolyFilter1D* npstat::SequentialPolyFilterND::filter ( unsigned  dimNumber) const

Get the filter for the given dimension

◆ getFilter()

ArrayND<double> npstat::SequentialPolyFilterND::getFilter ( const unsigned *  index,
unsigned  lenIndex 
) const

Get the effective multivariate filter coefficients for the given grid point. Note that this operation is quite slow (it involves building a multivariate array using outer products of 1-d arrays) and should not be used when fast performance is essential.

◆ getFilterMatrix()

Matrix<double> npstat::SequentialPolyFilterND::getFilterMatrix ( ) const

Get the complete effective filter matrix

◆ isCompatible()

template<class Array >
bool npstat::SequentialPolyFilterND::isCompatible ( const Array &  in) const

Check compatibility of an array with the filter

◆ linearSelfContribution()

double npstat::SequentialPolyFilterND::linearSelfContribution ( unsigned long  index) const
virtual

Contribution of a single point into the density estimate using the linear index of the point

Implements npstat::AbsPolyFilterND.

◆ selfContribution()

double npstat::SequentialPolyFilterND::selfContribution ( const unsigned *  index,
unsigned  lenIndex 
) const
virtual

Contribution of a single point into the density estimate at that point (not normalized). This is needed for various leaving-one-out cross validation procedures.

Implements npstat::AbsPolyFilterND.

◆ sparseFilterTriplets()

template<class Triplet >
CPP11_auto_ptr<std::vector<Triplet> > npstat::SequentialPolyFilterND::sparseFilterTriplets ( ) const

Get the info needed to construct the sparse filter matrix


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