#include <interp.h>
This interpolation class is intended to be sufficiently general to handle any vector type. Interpolation of ovector like objects is performed with the default template parameters, and array_interp is provided for simple interpolation on C-style arrays.
The class automatically handles decreasing arrays by converting from an object of type vec_t
to an object ov type rvec_t
.
While vec_t
may be any vector type which allows indexing via [],
rvec_t
must be a vector type which allows indexing and has a constructor with one of the two forms
rvec_t::rvec_t(vec_t &v); rvec_t::rvec_t(vec_t v);
It is important that different instances of o2scl_interp_vec and o2scl_interp not be given the same interpolation objects, as they will clash.
Definition at line 673 of file interp.h.
Public Member Functions | |
o2scl_interp (base_interp< vec_t > &it, base_interp< rvec_t > &rit) | |
Create with base interpolation objects it and rit . | |
o2scl_interp (base_interp< vec_t > &it) | |
Create with base interpolation object it and use def_ritp for reverse interpolation if necessary. | |
o2scl_interp () | |
Create an interpolator using def_itp and def_ritp. | |
virtual | ~o2scl_interp () |
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 x1, const double x2, size_t n, const vec_t &x, const vec_t &y) |
Give the value of the integral ![]() | |
int | set_type (base_interp< vec_t > &it, base_interp< rvec_t > &rit) |
Set base interpolation object. | |
Data Fields | |
cspline_interp< vec_t > | def_itp |
Default base interpolation object (cubic spline with natural boundary conditions). | |
cspline_interp< rvec_t > | def_ritp |
Default base interpolation object for reversed vectors (cubic spline with natural boundary conditions). | |
Protected Attributes | |
base_interp< vec_t > * | itp |
Pointer to base interpolation object. | |
base_interp< rvec_t > * | ritp |
Pointer to base interpolation object for reversed vectors. |
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