twod_eqi_intp Class Reference

Two-dimensional interpolation for equally-spaced intervals. More...

#include <twod_eqi_intp.h>


Detailed Description

Note:
This class is unfinished.
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} \]

Definition at line 57 of file twod_eqi_intp.h.


Public Member Functions

double interp (double x, double y)
 Perform the 2-d interpolation.
int set_type (int type)
 Set the interpolation type.

Data Fields

double xoff
 Offset in x-direction.
double yoff
 Offset in y-direction.

Member Function Documentation

int set_type ( int  type  )  [inline]

  • 3: 3-point
  • 4: 4-point
  • 6: 6-point (default)

Definition at line 80 of file twod_eqi_intp.h.


The documentation for this class was generated from the following file:

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page