npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
kernelSensitivityMatrix.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_KERNELSENSITIVITYMATRIX_HH_
2 #define NPSTAT_KERNELSENSITIVITYMATRIX_HH_
3 
4 /*!
5 // \file kernelSensitivityMatrix.hh
6 //
7 // \brief Calculate kernel sensitivity matrix for KDE-like density estimation
8 //
9 // Author: I. Volobouev
10 //
11 // November 2022
12 */
13 
14 #include "npstat/nm/Matrix.hh"
17 
18 namespace npstat {
19  /**
20  // Template class Fcn2D should provide a method
21  // "Real operator()(Real x, Real y) const", where "Real" is one of
22  // floating point types (long double works best).
23  //
24  // It is assumed that the interfaces of classes "InPoly" and "OutPoly"
25  // are similar to those of npstat classes AbsClassicalOrthoPoly1D or
26  // ScalableClassicalOrthoPoly1D.
27  //
28  // In the returned matrix, row numbers correspond to the "output"
29  // polynomial degrees (y space) and column numbers to the "input"
30  // polynomial degrees (x space).
31  //
32  // Set "normalizeKernel" parameter to "false" if the kernel is already known
33  // to be normalized, that is, Int_ymin^ymax K(x, y) dy = 1 for every x.
34  */
35  template <class Fcn2D, class InPoly, class OutPoly>
37  const Fcn2D& kernel,
38  const InPoly& inputPoly, unsigned maxdegInputPoly,
39  const OutPoly& outPoly, unsigned maxdegOutPoly,
40  const AbsIntervalQuadrature1D& xIntegrator,
41  const AbsIntervalQuadrature1D& yIntegrator,
42  bool normalizeKernel=true);
43 
44  /**
45  // Template class Fcn2D should provide a method
46  // "Real operator()(Real x, Real y) const", where "Real" is one of
47  // floating point types (long double works best).
48  //
49  // It is assumed that the interface of class "OutPoly" is similar to that of
50  // npstat classes AbsClassicalOrthoPoly1D or ScalableClassicalOrthoPoly1D.
51  //
52  // In the returned matrix, row numbers correspond to the "output"
53  // polynomial degrees (y space) and column numbers to the "input"
54  // polynomial degrees (x space).
55  //
56  // Set "normalizeKernel" parameter to "false" if the kernel is already known
57  // to be normalized, that is, Int_ymin^ymax K(x, y) dy = 1 for every x.
58  */
59  template <class Fcn2D, class OutPoly>
61  const Fcn2D& kernel,
62  const ContOrthoPoly1D& inputPoly, unsigned maxdegInputPoly,
63  const OutPoly& outPoly, unsigned maxdegOutPoly,
64  const AbsIntervalQuadrature1D& yIntegrator,
65  bool normalizeKernel=true);
66 }
67 
68 #include "npstat/nm/kernelSensitivityMatrix.icc"
69 
70 #endif // NPSTAT_KERNELSENSITIVITYMATRIX_HH_
Base class for quadratures on the [-1, 1] interval.
Continuous orthogonal polynomial series in one dimension generated for a discrete measure.
Template matrix class.
Definition: AbsIntervalQuadrature1D.hh:19
Definition: ContOrthoPoly1D.hh:40
Definition: AbsArrayProjector.hh:14
Matrix< double > kernelSensitivityMatrix(const Fcn2D &kernel, const InPoly &inputPoly, unsigned maxdegInputPoly, const OutPoly &outPoly, unsigned maxdegOutPoly, const AbsIntervalQuadrature1D &xIntegrator, const AbsIntervalQuadrature1D &yIntegrator, bool normalizeKernel=true)