Public Member Functions | Protected Attributes | Private Member Functions | List of all members
o2scl::interp< vec_t, vec2_t > Class Template Reference

Interpolation class for general vectors. More...

#include <interp.h>

Detailed Description

template<class vec_t = boost::numeric::ublas::vector<double>, class vec2_t = vec_t>
class o2scl::interp< vec_t, vec2_t >

See also the Interpolation section of the O2scl User's guide.

Interpolation of ublas vector like objects is performed with the default template parameters, and interp_array is provided for simple interpolation on C-style arrays.

The type of interpolation to be performed can be specified using the set_type() function or in the constructor. The default is cubic splines with natural boundary conditions.

Definition at line 1654 of file interp.h.

Public Member Functions

 interp (size_t interp_type=itp_cspline)
 Create with base interpolation object it.
 
virtual double eval (const double x0, size_t n, const vec_t &x, const vec2_t &y)
 Give the value of the function, $ y(x=x_0) $ , as specified as the first n elements of vectors x and y.
 
virtual double deriv (const double x0, size_t n, const vec_t &x, const vec2_t &y)
 Give the value of the derivative, $ y^{\prime}(x=x_0) $ , where $ y(x) $ is specified in the first n elements of vectors x and y.
 
virtual double deriv2 (const double x0, size_t n, const vec_t &x, const vec2_t &y)
 Give the value of the second derivative, $ y^{\prime\prime}(x=x_0) $ , where $ y(x) $ is specified in the first n elements of vectors x and y.
 
virtual double integ (const double x1, const double x2, size_t n, const vec_t &x, const vec2_t &y)
 Give the value of the integral $ \int_a^{b}y(x)~dx $ , where $ y(x) $ is specified in the first n elements of vectors x and y.
 
void set_type (size_t interp_type)
 Set base interpolation type.
 

Protected Attributes

interp_base< vec_t, vec2_t > * itp
 Pointer to base interpolation object.
 

Private Member Functions

 interp (const interp< vec_t, vec2_t > &)
 
interp< vec_t, vec2_t > & operator= (const interp< vec_t, vec2_t > &)
 

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

Documentation generated with Doxygen. Provided under the GNU Free Documentation License (see License Information).