1 #ifndef NPSTAT_BUILDINTERPOLATEDDISTRO1DNP_HH_
2 #define NPSTAT_BUILDINTERPOLATEDDISTRO1DNP_HH_
14 #include "geners/CPP11_auto_ptr.hh"
66 template <
class Po
int>
67 CPP11_auto_ptr<InterpolatedDistro1DNP>
68 buildInterpolatedDistro1DNP(
69 const std::vector<Point>& data,
70 const unsigned* dimPredictors,
unsigned nPredictors,
71 const std::string* predictorNames,
72 const unsigned* predictorNumBins,
int predictorSymbetaPower,
73 double effectiveEventsPerBin,
bool stretchPredKernels,
74 unsigned responseDimToUse,
75 const AbsDistro1DBuilder<Point>& builder,
76 bool interpolateVertically =
false,
unsigned reportFrequency = 0);
79 template <
class Po
int>
80 inline InterpolatedDistro1DNP*
81 buildInterpolatedDistro1DNP_2(
82 const std::vector<Point>& data,
83 const unsigned* dimPredictors,
unsigned nPredictors,
84 const std::vector<std::string> predictorNames,
85 const unsigned* predictorNumBins,
unsigned lenBins,
86 int predictorSymbetaPower,
87 double effectiveEventsPerBin,
bool stretchPredKernels,
88 unsigned responseDimToUse,
89 const AbsDistro1DBuilder<Point>& builder,
90 bool interpolateVertically =
false,
unsigned reportFrequency = 0)
92 if (nPredictors != lenBins)
throw std::invalid_argument(
93 "In npstat::buildInterpolatedDistro1DNP_2: "
94 "incompatible arguments");
95 const unsigned namesSz = predictorNames.size();
96 const std::string* predNames = 0;
99 if (namesSz != nPredictors)
throw std::invalid_argument(
100 "In npstat::buildInterpolatedDistro1DNP_2: "
101 "incompatible set of predictor names");
102 predNames = &predictorNames[0];
104 CPP11_auto_ptr<InterpolatedDistro1DNP> ptr =
105 buildInterpolatedDistro1DNP(
106 data, dimPredictors, nPredictors, predNames,
107 predictorNumBins, predictorSymbetaPower,
108 effectiveEventsPerBin, stretchPredKernels,
109 responseDimToUse, builder,
110 interpolateVertically, reportFrequency);
111 return ptr.release();
116 #include "npstat/stat/buildInterpolatedDistro1DNP.icc"
Interface definition for classes which reconstruct univariate distrubutions from data samples.
Interpolation of 1-d distributions as a function of multiple parameters.
Definition: AbsArrayProjector.hh:14