![]() |
Object-oriented Scientific Computing Library: Version 0.910
|
Smart interpolation class. More...
#include <smart_interp.h>
This class can semi-intelligently handle arrays which are not-well formed outside the interpolation region. In particular, if an initial interpolation or derivative calculation fails, the arrays are searched for the largest neighborhood around the point x
for which an interpolation or differentiation will likely produce a finite result.
Definition at line 51 of file smart_interp.h.
Public Member Functions | |
smart_interp (base_interp_mgr< vec_t > &im1, base_interp_mgr< svec_t > &im3) | |
Create a new interpolation object with the specified interpolation managers. | |
smart_interp () | |
Create an interpolation object with the default cubic spline interpolation managers. | |
virtual double | interp (const double x0, size_t n, const vec_t &x, const vec_t &y) |
Give the value of the function ![]() | |
virtual double | deriv (const double x0, size_t n, const vec_t &x, const vec_t &y) |
Give the value of the derivative ![]() | |
virtual double | deriv2 (const double x0, size_t n, const vec_t &x, const vec_t &y) |
Give the value of the second derivative ![]() | |
virtual double | integ (const double a, const double b, size_t n, const vec_t &x, const vec_t &y) |
Give the value of the integral ![]() | |
Data Fields | |
Default interpolation managers | |
def_interp_mgr< vec_t, cspline_interp > | dim1 |
def_interp_mgr< svec_t, cspline_interp > | dim3 |
Protected Member Functions | |
size_t | local_lookup (size_t n, const vec_t &x, double x0) |
A lookup function for generic vectors. | |
int | find_subset (const double a, const double b, size_t sz, const vec_t &x, const vec_t &y, size_t &nsz) |
Try to find the largest monotonic and finite region around the desired location. | |
Protected Attributes | |
Storage internally created subvectors | |
bool | sxalloc |
const svec_t * | sx |
const svec_t * | sy |
Pointers to interpolation objects | |
base_interp< vec_t > * | rit1 |
base_interp< svec_t > * | rit3 |
Pointers to interpolation managers | |
base_interp_mgr< vec_t > * | bim1 |
base_interp_mgr< svec_t > * | bim3 |
virtual double smart_interp< vec_t, svec_t >::interp | ( | const double | x0, |
size_t | n, | ||
const vec_t & | x, | ||
const vec_t & | y | ||
) | [inline, virtual] |
nn
is larger than the minimum interpolation size. Definition at line 134 of file smart_interp.h.
int smart_interp< vec_t, svec_t >::find_subset | ( | const double | a, |
const double | b, | ||
size_t | sz, | ||
const vec_t & | x, | ||
const vec_t & | y, | ||
size_t & | nsz | ||
) | [inline, protected] |
This function tries to find the largest monotonic region enclosing both a
and b
in the vector x
. If it succeeds, it returns gsl_success, and if it fails, it returns gsl_efailed. It does not call the error handler.
Definition at line 409 of file smart_interp.h.
Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).