All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions
o2scl::interp_linear< vec_t, vec2_t > Class Template Reference

Linear interpolation (GSL) More...

Detailed Description

template<class vec_t, class vec2_t = vec_t>
class o2scl::interp_linear< vec_t, vec2_t >

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

Linear interpolation requires no calls to allocate() or free() as there is no internal storage required.

Definition at line 184 of file interp.h.

#include <interp.h>

Inheritance diagram for o2scl::interp_linear< vec_t, vec2_t >:
o2scl::interp_base< vec_t, vec2_t >

Public Member Functions

virtual void set (size_t size, const vec_t &x, const vec2_t &y)
 Initialize interpolation routine.
 
virtual double eval (double x0) const
 Give the value of the function $ y(x=x_0) $ .
 
virtual double deriv (double x0) const
 Give the value of the derivative $ y^{\prime}(x=x_0) $ .
 
virtual double deriv2 (double x0) const
 Give the value of the second derivative $ y^{\prime \prime}(x=x_0) $ (always zero)
 
virtual double integ (double a, double b) const
 Give the value of the integral $ \int_a^{b}y(x)~dx $ .
 
virtual const char * type () const
 Return the type, "interp_linear".
 
- Public Member Functions inherited from o2scl::interp_base< vec_t, vec2_t >
virtual double operator() (double x0) const
 Give the value of the function $ y(x=x_0) $ .
 

Private Member Functions

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

Additional Inherited Members

- Data Fields inherited from o2scl::interp_base< vec_t, vec2_t >
size_t min_size
 The minimum size of the vectors to interpolate between. More...
 
- Protected Member Functions inherited from o2scl::interp_base< vec_t, vec2_t >
double integ_eval (double ai, double bi, double ci, double di, double xi, double a, double b) const
 An internal function to assist in computing the integral for both the cspline and Akima types.
 
- Protected Attributes inherited from o2scl::interp_base< vec_t, vec2_t >
search_vec< const vec_t > svx
 To perform binary searches. More...
 
const vec_t * px
 Independent vector.
 
const vec2_t * py
 Dependent vector.
 
size_t sz
 Vector size.
 

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).
Hosted at Get Object-oriented Scientific Computing
Lib at SourceForge.net. Fast, secure and Free Open Source software
downloads..