Interpolation2D Class Reference
Inheritance diagram for Interpolation2D:
Detailed Description2-dim interpolation - linear or cubic spline The class uses 1d gsl interpolation function and depends on boost multi_array so both of those libraries need to be linked. The evalaution is done with the function interp(const vector<double> &x) and the status of the last evaluation can be checked with eval_status(). Example of usage: boost::multi_array<double, 2> matrix_A(boost::extents[n][m]); for (unsigned i=0;i<n;i++) { for (unsigned j=0;j<m;j++) { ... vec_x1[i] = arg1; vec_x2[j] = arg2; matrix_A[i][j] = val; } } Interpolation2D int2d(vec_x1, vec_x2, matrix_A, *gsl_interp_cspline); ... int2d.interp(vec_x); Constructor & Destructor Documentation◆ Interpolation2D()
constructor - read the input and interpolate in the innermost dimension x2
◆ ~Interpolation2D()
destructor Member Function Documentation◆ grid_limits()
return grid limits in form of 2d vector of pairs: [[x1min,x1max], [x2min, x2max]] Min and max values in each dimension can be obtained by using first or second pair data members. Reimplemented from BaseInterpolation. ◆ interp()
return value from 2d spline interpolation at (x1,x2) Reimplemented from BaseInterpolation. The documentation for this class was generated from the following files:
Generated on Fri Jun 7 2019 18:46:38 for TMDlib by 1.8.15 |