npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
interpolateHistoND.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_INTERPOLATEHISTOND_HH_
2 #define NPSTAT_INTERPOLATEHISTOND_HH_
3 
4 /*!
5 // \file interpolateHistoND.hh
6 //
7 // \brief Interpolate histogram contents
8 //
9 // Functions which interpolate histogram contents are not included
10 // into the HistoND template itself because we do not always want to
11 // create histograms using bin types which can be multiplied by doubles
12 // (also, results of such a multiplication have to be automatically
13 // converted back to the same type).
14 //
15 // The implementations work by invoking "interpolate1" or "interpolate3"
16 // ArrayND methods on the histogram bin contents after an appropriate
17 // coordinate transformation.
18 //
19 // Author: I. Volobouev
20 //
21 // November 2011
22 */
23 
24 #include "npstat/stat/HistoND.hh"
25 
26 namespace npstat {
27  /**
28  // The interpolation degree in this method can be set to 0, 1, or 3
29  // which results, respectively, in closest bin lookup, multilinear
30  // interpolation, or multicubic interpolation. Value of the closest
31  // bin inside the histogram range is used if some coordinate is outside
32  // of the corresponding axis limits.
33  */
34  template <typename Float, class Axis>
36  const double *coords, unsigned coordsDim,
37  unsigned interpolationDegree);
38  //@{
39  /**
40  // Convenience function for interpolating histograms, with
41  // an explicit coordinate argument for each histogram dimension
42  */
43  template <typename Float, class Axis>
45  double x0, unsigned interpolationDegree);
46 
47  template <typename Float, class Axis>
48  Float interpolateHistoND(const HistoND<Float,Axis>& histo,
49  double x0, double x1,
50  unsigned interpolationDegree);
51 
52  template <typename Float, class Axis>
53  Float interpolateHistoND(const HistoND<Float,Axis>& histo,
54  double x0, double x1, double x2,
55  unsigned interpolationDegree);
56 
57  template <typename Float, class Axis>
58  Float interpolateHistoND(const HistoND<Float,Axis>& histo,
59  double x0, double x1, double x2, double x3,
60  unsigned interpolationDegree);
61 
62  template <typename Float, class Axis>
63  Float interpolateHistoND(const HistoND<Float,Axis>& histo,
64  double x0, double x1, double x2, double x3,
65  double x4, unsigned interpolationDegree);
66 
67  template <typename Float, class Axis>
68  Float interpolateHistoND(const HistoND<Float,Axis>& histo,
69  double x0, double x1, double x2, double x3,
70  double x4, double x5,
71  unsigned interpolationDegree);
72 
73  template <typename Float, class Axis>
74  Float interpolateHistoND(const HistoND<Float,Axis>& histo,
75  double x0, double x1, double x2, double x3,
76  double x4, double x5, double x6,
77  unsigned interpolationDegree);
78 
79  template <typename Float, class Axis>
80  Float interpolateHistoND(const HistoND<Float,Axis>& histo,
81  double x0, double x1, double x2, double x3,
82  double x4, double x5, double x6, double x7,
83  unsigned interpolationDegree);
84 
85  template <typename Float, class Axis>
86  Float interpolateHistoND(const HistoND<Float,Axis>& histo,
87  double x0, double x1, double x2, double x3,
88  double x4, double x5, double x6, double x7,
89  double x8, unsigned interpolationDegree);
90 
91  template <typename Float, class Axis>
92  Float interpolateHistoND(const HistoND<Float,Axis>& histo,
93  double x0, double x1, double x2, double x3,
94  double x4, double x5, double x6, double x7,
95  double x8, double x9,
96  unsigned interpolationDegree);
97  //@}
98 }
99 
100 #include "npstat/stat/interpolateHistoND.icc"
101 
102 #endif // NPSTAT_INTERPOLATEHISTOND_HH_
Arbitrary-dimensional histogram template.
Definition: HistoND.hh:46
Definition: AbsArrayProjector.hh:14
Float interpolateHistoND(const HistoND< Float, Axis > &histo, const double *coords, unsigned coordsDim, unsigned interpolationDegree)