npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
DiscreteGauss1DBuilder.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_DISCRETEGAUSS1DBUILDER_HH_
2 #define NPSTAT_DISCRETEGAUSS1DBUILDER_HH_
3 
4 /*!
5 // \file DiscreteGauss1DBuilder.hh
6 //
7 // \brief Builder of discrete Gaussian filters in one dimension
8 //
9 // The filters are intended for use with the "LocalPolyFilter1D" class.
10 //
11 // Author: I. Volobouev
12 //
13 // December 2019
14 */
15 
16 #include <vector>
17 
20 
21 namespace npstat {
23  {
24  public:
25  /**
26  // The constructor arguments are as follows:
27  //
28  // bandwidth -- The bandwidth of the filter in the units
29  // of bin width. Must be non-negative.
30  //
31  // dataLen -- Length of data arrays to be filtered by
32  // the filters built with this object.
33  */
34  DiscreteGauss1DBuilder(double bandwidth, unsigned dataLen);
35 
36  inline virtual ~DiscreteGauss1DBuilder() {}
37 
38  /** A simple inspector of object properties */
39  inline double bandwidth() const {return bandwidth_;}
40 
41  /** This method is pure virtual in the base, so it must be implemented */
42  inline unsigned centralWeightLength() const {return dataLen_;}
43 
44  /** Internal filters are all different */
45  inline bool keepAllFilters() const {return true;}
46 
47  /** The "taper" and "lenTaper" arguments will be ignored */
48  virtual PolyFilter1D* makeFilter(const double* taper, unsigned lenTaper,
49  unsigned binnum, unsigned datalen) const;
50  private:
54 
55  ConvolutionEngine1D engine_;
56  std::vector<double> bufvec_;
57  double bandwidth_;
58  unsigned dataLen_;
59  };
60 }
61 
62 #endif // NPSTAT_DISCRETEGAUSS1DBUILDER_HH_
Abstract interface for building local polynomial filter weights in 1-d.
Fast one-dimensional convolutions via Fourier transforms (FFTW interface)
Definition: ConvolutionEngine1D.hh:31
Definition: DiscreteGauss1DBuilder.hh:23
virtual PolyFilter1D * makeFilter(const double *taper, unsigned lenTaper, unsigned binnum, unsigned datalen) const
DiscreteGauss1DBuilder(double bandwidth, unsigned dataLen)
bool keepAllFilters() const
Definition: DiscreteGauss1DBuilder.hh:45
unsigned centralWeightLength() const
Definition: DiscreteGauss1DBuilder.hh:42
double bandwidth() const
Definition: DiscreteGauss1DBuilder.hh:39
Definition: AbsFilter1DBuilder.hh:34
Definition: AbsArrayProjector.hh:14
Definition: AbsFilter1DBuilder.hh:71