1 #ifndef NPSTAT_STORABLEINTERPOLATIONFUNCTOR_HH_ 2 #define NPSTAT_STORABLEINTERPOLATIONFUNCTOR_HH_ 24 template <
class Numeric,
class Axis = UniformAxis,
class Converter = Same<Numeric> >
26 template <
typename Num2,
typename Axis2,
typename Conv2>
44 template <
class Num2,
class Conv2>
55 const std::vector<std::pair<bool, bool> >& interpolationType,
56 const char* functionLabel =
nullptr)
68 const char* functionLabel =
nullptr)
80 const char* functionLabel =
nullptr)
96 const char* functionLabel =
nullptr)
99 xAxis, leftX, rightX,
yAxis, leftY, rightY,
zAxis, leftZ, rightZ, tAxis, leftT, rightT, functionLabel) {}
116 const char* functionLabel =
nullptr)
162 gs::ClassId
classId()
const override {
return gs::ClassId(*
this); }
163 bool write(std::ostream&
of)
const override;
168 static inline unsigned version() {
return 1; }
185 #include "Alignment/Geners/interface/binaryIO.hh" 186 #include "Alignment/Geners/interface/CPP11_auto_ptr.hh" 187 #include "Alignment/Geners/interface/IOException.hh" 190 template <
typename Numeric,
class Axis,
class Converter>
192 static const std::string myClass(gs::template_class_name<Numeric, Axis>(
"npstat::StorableInterpolationFunctor"));
193 return myClass.c_str();
196 template <
typename Numeric,
class Axis,
class Converter>
199 return table_.classId().write(
of) && table_.write(
of);
202 template <
typename Numeric,
class Axis,
class Converter>
204 const gs::ClassId&
id, std::istream&
in) {
206 current.ensureSameId(
id);
209 gs::read_pod(
in, &descr);
210 gs::ClassId tabid(
in, 1);
212 throw gs::IOReadFailure(
213 "In npstat::StorableInterpolationFunctor::read: " 214 "input stream failure");
220 #endif // NPSTAT_STORABLEINTERPOLATIONFUNCTOR_HH_ const ArrayND< Numeric > & table() const
bool write(std::ostream &of) const override
StorableInterpolationFunctor(const Axis &xAxis, bool leftX, bool rightX, const Axis &yAxis, bool leftY, bool rightY, const Axis &zAxis, bool leftZ, bool rightZ, const Axis &tAxis, bool leftT, bool rightT, const Axis &vAxis, bool leftV, bool rightV, const char *functionLabel=nullptr)
double operator()(const double *point, unsigned dim) const override
StorableInterpolationFunctor(const LinInterpolatedTableND< Num2, Axis > &table)
void setConverter(const Converter &conv)
Interface definition for storable multivariate functors.
static unsigned version()
ArrayND< Numeric > & table()
static StorableInterpolationFunctor * read(const gs::ClassId &id, std::istream &in)
StorableInterpolationFunctor(const Axis &xAxis, bool leftX, bool rightX, const Axis &yAxis, bool leftY, bool rightY, const Axis &zAxis, bool leftZ, bool rightZ, const Axis &tAxis, bool leftT, bool rightT, const char *functionLabel=nullptr)
StorableInterpolationFunctor(const Axis &xAxis, bool leftX, bool rightX, const char *functionLabel=nullptr)
const std::string & description() const
unsigned minDim() const override
Multilinear interpolation/extrapolation on rectangular grids.
~StorableInterpolationFunctor() override
const ArrayND< Numeric > & table() const
StorableInterpolationFunctor(const StorableInterpolationFunctor< Num2, Axis, Conv2 > &tab)
Interface definitions and concrete simple functors for a variety of functor-based calculations...
StorableInterpolationFunctor(const std::vector< Axis > &axes, const std::vector< std::pair< bool, bool > > &interpolationType, const char *functionLabel=nullptr)
StorableInterpolationFunctor(const Axis &xAxis, bool leftX, bool rightX, const Axis &yAxis, bool leftY, bool rightY, const Axis &zAxis, bool leftZ, bool rightZ, const char *functionLabel=nullptr)
StorableInterpolationFunctor(const LinInterpolatedTableND< Num2, Axis > &table, const std::string &descr)
gs::ClassId classId() const override
StorableInterpolationFunctor(const Axis &xAxis, bool leftX, bool rightX, const Axis &yAxis, bool leftY, bool rightY, const char *functionLabel=nullptr)
bool isEqual(const StorableMultivariateFunctor &other) const override
LinInterpolatedTableND< Numeric, Axis > Table
const Table & interpolator() const
StorableInterpolationFunctor()=delete
static const char * classname()
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point