Class interp2_base (o2scl)¶
-
template<class vec_t = boost::numeric::ublas::vector<double>, class mat_t = boost::numeric::ublas::matrix<double>>
class interp2_base¶ Two-dimensional interpolation base class [abstract].
Subclassed by o2scl::interp2_direct< vector< double >, data_t, o2scl::matrix_row_gen< data_t >, o2scl::matrix_column_gen< data_t > >, o2scl::interp2_direct< vec_t, mat_t, mat_row_t, mat_column_t >, o2scl::interp2_seq< vec_t, mat_t, mat_row_t >
Public Functions
-
inline interp2_base()¶
-
inline virtual ~interp2_base()¶
-
virtual double eval(double x, double y) const = 0¶
Perform the 2-d interpolation.
-
inline virtual double operator()(double x, double y) const¶
Perform the 2-d interpolation.
-
virtual double deriv_x(double x, double y) const = 0¶
Compute the partial derivative in the x-direction.
-
virtual double deriv_xx(double x, double y) const = 0¶
Compute the partial second derivative in the x-direction.
-
virtual double integ_x(double x0, double x1, double y) const = 0¶
Compute the integral in the x-direction between x=x0 and x=x1.
-
virtual double deriv_y(double x, double y) const = 0¶
Compute the partial derivative in the y-direction.
-
virtual double deriv_yy(double x, double y) const = 0¶
Compute the partial second derivative in the y-direction.
-
virtual double integ_y(double x, double y0, double y1) const = 0¶
Compute the integral in the y-direction between y=y0 and y=y1.
-
virtual double deriv_xy(double x, double y) const = 0¶
Compute the mixed partial derivative \( \frac{\partial^2 f}{\partial x \partial y} \).
-
virtual double eval_gen(int ix, int iy, double x0, double x1, double y0, double y1) const = 0¶
Compute a general interpolation result.
This computes
\[ \frac{\partial^m}{\partial x^m} \frac{\partial^n}{\partial y^n} f(x,y) \]for \( m \in (-1,0,1,2) \) and \( n \in (-1,0,1,2) \) with the notation\[\begin{split}\begin{eqnarray*} \frac{\partial^{-1}}{\partial x^{-1}} &\equiv & \int_{x_0}^{x_1} f~dx \nonumber \\ \frac{\partial^0}{\partial x^0} &\equiv & \left.f\right|_{x=x_0} \nonumber \\ \frac{\partial^1}{\partial x^1} &\equiv & \left(\frac{\partial f}{\partial x}\right)_{x=x_0} \nonumber \\ \frac{\partial^2}{\partial x^2} &\equiv & \left(\frac{\partial^2 f}{\partial x^2}\right)_{x=x_0} \end{eqnarray*}\end{split}\]and the value of \( x_1 \) is ignored when \( m \geq 0 \) and the value of \( y_1 \) is ignored when \( n \geq 0 \).
Protected Attributes
-
size_t nx¶
The number of x grid points.
-
size_t ny¶
The number of y grid points.
Private Functions
-
interp2_base(const interp2_base<vec_t, mat_t>&)¶
-
interp2_base<vec_t, mat_t> &operator=(const interp2_base<vec_t, mat_t>&)¶
-
inline interp2_base()¶