Class interp2_eqi (o2scl)

O2scl : Class List

class interp2_eqi

Two-dimensional interpolation for equally-spaced intervals.

This implements the relations from Abramowitz and Stegun:

\[ f(x_0+p h,y_0+q k)= \]
3-point
\[ (1-p-q) f_{0,0}+p f_{1,0}+q f_{0,1} \]
4-point
\[ (1-p)(1-q) f_{0,0}+p(1-q)f_{1,0}+q(1-p)f_{0,1}+pqf_{1,1} \]
6-point
\[ \frac{q(q-1)}{2}f_{0,-1}+\frac{p(p-1)}{2}f_{-1,0}+ (1+pq-p^2-q^2)f_{0,0}+\frac{p(p-2q+1)}{2}f_{1,0}+ \frac{q(q-2p+1)}{2}f_{0,1}+pqf_{1,1} \]

Note

This class is unfinished.

Public Functions

interp2_eqi()
double interp(double x, double y)

Perform the 2-d interpolation.

inline int set_type(int type)

Set the interpolation type.

  • 3: 3-point

  • 4: 4-point

  • 6: 6-point (default)

Public Members

double xoff

Offset in x-direction.

double yoff

Offset in y-direction.

Protected Attributes

int itype