Object-oriented Scientific Computing Library: Version 0.910
Public Member Functions | Protected Attributes | Private Member Functions
o2scl_interp_vec< vec_t > Class Template Reference

Interpolation class for pre-specified vector. More...

#include <interp.h>


Detailed Description

template<class vec_t = ovector_const_view>
class o2scl_interp_vec< vec_t >

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_vec is provided for simple interpolation on C-style arrays.

This class does not double check the vector to ensure that all of the intervals for the abcissa are all increasing or all decreasing.

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

Definition at line 1293 of file interp.h.

Public Member Functions

 o2scl_interp_vec (base_interp_mgr< vec_t > &it, size_t n, const vec_t &x, const vec_t &y)
 Create with base interpolation object it.
virtual double interp (const double x0)
 Give the value of the function $ y(x=x_0) $ .
virtual double deriv (const double x0)
 Give the value of the derivative $ y^{\prime}(x=x_0) $ .
virtual double deriv2 (const double x0)
 Give the value of the second derivative $ y^{\prime \prime}(x=x_0) $ .
virtual double integ (const double x1, const double x2)
 Give the value of the integral $ \int_a^{b}y(x)~dx $ .
int set_type (base_interp_mgr< vec_t > &it)
 Set base interpolation object.

Protected Attributes

base_interp< vec_t > * itp
 Base interpolation object.
base_interp_mgr< vec_t > * bim
 The interpolation manager.
bool inc
 True if the original array was increasing.
const vec_t * lx
 Pointer to the user-specified x vector.
const vec_t * ly
 Pointer to the user-specified x vector.
size_t ln
 Size of user-specified vectors.

Private Member Functions

 o2scl_interp_vec (const o2scl_interp_vec< vec_t > &)
o2scl_interp_vec< vec_t > & operator= (const o2scl_interp_vec< vec_t > &)

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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

Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads.