23 #ifndef __TMDlib_INTERPOLATIONKS_H__ 24 #define __TMDlib_INTERPOLATIONKS_H__ 31 #include <boost/multi_array/base.hpp> 32 #include <boost/shared_ptr.hpp> 33 #include <boost/multi_array.hpp> 34 #include <gsl/gsl_errno.h> 35 #include <gsl/gsl_interp.h> 36 #include <gsl/gsl_spline.h> 39 #include <gsl/gsl_interp2d.h> 40 #include <gsl/gsl_spline2d.h> 56 return vector<pair <double, double> >(); }
59 virtual double interp (
const vector<double> &x) {
return -1.0; }
74 unsigned int _eval_status;
121 Interpolation2D(
const vector<double> &x1vv,
const vector<double> &x2vv,
122 boost::multi_array<double, 2> ym,
123 gsl_interp_type int_type = *gsl_interp_linear);
133 vector<pair <double, double> > grid_limits()
const;
136 double interp (
const vector<double> &x);
140 gsl_interp_type _int_type;
141 gsl_interp2d_type _int2d_type;
143 boost::multi_array<double, 2> y;
144 gsl_interp_accel* x1acc;
145 gsl_interp_accel* x2acc;
146 gsl_spline2d* spline2d;
147 vector<double> x1v, x2v;
166 CubicSpline3D(
const vector<double> &x1vv,
const vector<double> &x2vv,
167 const vector<double> &x3vv, boost::multi_array<double, 3> ym);
182 vector<pair <double, double> > grid_limits()
const;
183 double interp (
const vector<double> &x);
187 unsigned int n1, n2, n3;
188 boost::multi_array<double, 3> y;
189 vector<gsl_interp_accel*> x1acc;
190 vector<gsl_interp_accel*> x2acc;
191 vector<gsl_spline2d*> spline2d;
192 vector<double> x1v, x2v, x3v;
198 #endif // __TMDlib_INTERPOLATIONKS_H__ Definition: TMDlib_InterpolationKS.h:161
Definition: TMDlib_InterpolationKS.h:110
BaseInterpolation()
default constructor
Definition: TMDlib_InterpolationKS.h:50
virtual ~BaseInterpolation()
default destructor
Definition: TMDlib_InterpolationKS.h:52
Definition: TMDlib_InterpolationKS.h:47
virtual double interp(const vector< double > &x)
return the interpolated value corresponding to the vector (x1,x2,x3,..)
Definition: TMDlib_InterpolationKS.h:59
virtual vector< pair< double, double > > grid_limits() const
grid limits in form of vector of pairs: [[x1min,x1max], [x2min,x2max],..]
Definition: TMDlib_InterpolationKS.h:55
unsigned int eval_status()
Definition: TMDlib_InterpolationKS.h:71