#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 46 of file smart_interp.h.
Public Member Functions | |
smart_interp (base_interp< vec_t > &it1, base_interp< rvec_t > &it2, base_interp< svec_t > &it3, base_interp< srvec_t > &it4) | |
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 objects | |
cspline_interp< vec_t > | cit1 |
cspline_interp< rvec_t > | cit2 |
cspline_interp< svec_t > | cit3 |
cspline_interp< srvec_t > | cit4 |
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, bool &increasing) |
Try to find the largest monotonic and finite region around the desired location. | |
Protected Attributes | |
Storage internally created subvectors | |
const svec_t * | sx |
const svec_t * | sy |
const srvec_t * | srx |
const srvec_t * | sry |
Pointers to interpolation objects | |
base_interp< vec_t > * | rit1 |
base_interp< rvec_t > * | rit2 |
base_interp< svec_t > * | rit3 |
base_interp< srvec_t > * | rit4 |
int find_subset | ( | const double | a, | |
const double | b, | |||
size_t | sz, | |||
const vec_t & | x, | |||
const vec_t & | y, | |||
size_t & | nsz, | |||
bool & | increasing | |||
) | [inline, protected] |
Try to find the largest monotonic and finite region around the desired location.
Definition at line 563 of file smart_interp.h.
Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.
Project hosting provided by
,
O2scl Sourceforge Project Page