#include <interp.h>
The descendants of this class are intended to be fast interpolation routines for increasing functions, leaving the some error handling, user-friendliness, and other more complicated improvements for other classes.
For any pair of vectors x and y into which you would like to interpolate, you need to call allocate() and init() first, and then the interpolation functions, and then free(). If the next pair of vectors has the same size, then you need only to call init() before the next call to an interpolation function. If the vectors do not change, then you may call the interpolation functions in succession.
All of the descendants are based on the GSL interpolation routines and give identical results.
Definition at line 67 of file interp.h.
Public Member Functions | |
virtual int | allocate (size_t size) |
Allocate memory, assuming x and y have size size . | |
virtual int | free () |
Free allocated memory. | |
virtual int | init (const vec_t &x, const vec_t &y, size_t size) |
Initialize interpolation routine. | |
virtual int | interp (const vec_t &x, const vec_t &y, size_t size, double x0, double &y0)=0 |
Give the value of the function ![]() | |
virtual int | deriv (const vec_t &x, const vec_t &y, size_t size, double x0, double &dydx)=0 |
Give the value of the derivative ![]() | |
virtual int | deriv2 (const vec_t &x, const vec_t &y, size_t size, double x0, double &d2ydx2)=0 |
Give the value of the second derivative ![]() | |
virtual int | integ (const vec_t &x, const vec_t &y, size_t size, double a, double b, double &result)=0 |
Give the value of the integral ![]() | |
virtual const char * | type () |
Return the type, "base_interp" . | |
Data Fields | |
size_t | min_size |
The minimum size of the vectors to interpolate between. | |
Protected Member Functions | |
double | integ_eval (double ai, double bi, double ci, double di, double xi, double a, double b) |
An internal function to assist in computing the integral for both the cspline and Akima types. | |
Protected Attributes | |
search_vec< vec_t > | sv |
The binary search object. | |
Private Member Functions | |
base_interp (const base_interp< vec_t > &) | |
base_interp< vec_t > & | operator= (const base_interp< vec_t > &) |
size_t min_size |
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