npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
MatrixFilter1DBuilder.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_MATRIXFILTER1DBUILDER_HH_
2 #define NPSTAT_MATRIXFILTER1DBUILDER_HH_
3 
4 /*!
5 // \file MatrixFilter1DBuilder.hh
6 //
7 // \brief Builder of filters in one dimension using filtering matrices
8 // prepared by some other code
9 //
10 // The filters are intended for use with the "LocalPolyFilter1D" class.
11 //
12 // Author: I. Volobouev
13 //
14 // February 2020
15 */
16 
18 #include "npstat/nm/Matrix.hh"
19 
20 namespace npstat {
22  {
23  public:
24  /** Each row of matrix "m" is a filter */
25  inline explicit MatrixFilter1DBuilder(const Matrix<double>& m) : m_(m) {}
26 
27  inline virtual ~MatrixFilter1DBuilder() {}
28 
29  /** This method is pure virtual in the base, so it must be implemented */
30  inline unsigned centralWeightLength() const {return m_.nColumns();}
31 
32  /** Internal filters can all be different */
33  inline bool keepAllFilters() const {return true;}
34 
35  /** The "taper" and "lenTaper" arguments will be ignored */
36  virtual PolyFilter1D* makeFilter(const double* taper, unsigned lenTaper,
37  unsigned binnum, unsigned datalen) const;
38  private:
39  Matrix<double> m_;
40  };
41 }
42 
43 #endif // NPSTAT_MATRIXFILTER1DBUILDER_HH_
Abstract interface for building local polynomial filter weights in 1-d.
Template matrix class.
Definition: MatrixFilter1DBuilder.hh:22
bool keepAllFilters() const
Definition: MatrixFilter1DBuilder.hh:33
virtual PolyFilter1D * makeFilter(const double *taper, unsigned lenTaper, unsigned binnum, unsigned datalen) const
unsigned centralWeightLength() const
Definition: MatrixFilter1DBuilder.hh:30
MatrixFilter1DBuilder(const Matrix< double > &m)
Definition: MatrixFilter1DBuilder.hh:25
Definition: AbsFilter1DBuilder.hh:34
Definition: AbsArrayProjector.hh:14
Definition: AbsFilter1DBuilder.hh:71