MADNESS  version 0.9
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
CubicInterpolationTable< T > Class Template Reference

An class for 1-D data interpolation based on cubic polynomials. More...

#include <interp.h>

Public Member Functions

template<typename functionT >
 CubicInterpolationTable (double lo, double hi, int npt, functionT &f)
 
template<typename functionT >
 CubicInterpolationTable (madness::World &world, double lo, double hi, int npt, functionT &f)
 
 CubicInterpolationTable ()
 
double myreal (const std::complex< double > &z) const
 
double myreal (double x)
 
operator() (double y) const
 
template<typename fredT >
double err (fredT f) const
 
 CubicInterpolationTable ()
 
template<typename functionT >
 CubicInterpolationTable (double lo, double hi, int npt, const functionT &f)
 
 CubicInterpolationTable (double lo, double hi, int npt, const std::vector< T > &y)
 
operator() (double y) const
 
template<typename functionT >
double err (const functionT &f) const
 
virtual ~CubicInterpolationTable ()
 

Protected Member Functions

void make_interpolation (const std::vector< double > &x, const std::vector< T > &p)
 

Static Protected Member Functions

static void cubic_fit (const double *x, const T *f, T *a)
 

Detailed Description

template<typename T>
class CubicInterpolationTable< T >

An class for 1-D data interpolation based on cubic polynomials.

Needs to be passed the endpoints of the interpolation: [lo,hi] and the number of grid points.

Two methods for generating the interpolation are presently supported: 1) Pass in a std::vector containing the y-points. 2) Pass in some object that provides an appropriate () operator, perhaps a function pointer.

Constructor & Destructor Documentation

template<typename T>
template<typename functionT >
CubicInterpolationTable< T >::CubicInterpolationTable ( double  lo,
double  hi,
int  npt,
functionT f 
)
inline
template<typename T>
template<typename functionT >
CubicInterpolationTable< T >::CubicInterpolationTable ( madness::World world,
double  lo,
double  hi,
int  npt,
functionT f 
)
inline
template<typename T>
CubicInterpolationTable< T >::CubicInterpolationTable ( )
inline
template<typename T>
CubicInterpolationTable< T >::CubicInterpolationTable ( )
inline
template<typename T>
template<typename functionT >
CubicInterpolationTable< T >::CubicInterpolationTable ( double  lo,
double  hi,
int  npt,
const functionT f 
)
inline
template<typename T>
CubicInterpolationTable< T >::CubicInterpolationTable ( double  lo,
double  hi,
int  npt,
const std::vector< T > &  y 
)
inline
template<typename T>
virtual CubicInterpolationTable< T >::~CubicInterpolationTable ( )
inlinevirtual

Member Function Documentation

template<typename T>
static void CubicInterpolationTable< T >::cubic_fit ( const double *  x,
const T *  f,
T *  a 
)
inlinestaticprotected
template<typename T>
template<typename functionT >
double CubicInterpolationTable< T >::err ( const functionT f) const
inline
template<typename T>
template<typename fredT >
double CubicInterpolationTable< T >::err ( fredT  f) const
inline

Referenced by main().

template<typename T>
void CubicInterpolationTable< T >::make_interpolation ( const std::vector< double > &  x,
const std::vector< T > &  p 
)
inlineprotected
template<typename T>
double CubicInterpolationTable< T >::myreal ( const std::complex< double > &  z) const
inline
template<typename T>
double CubicInterpolationTable< T >::myreal ( double  x)
inline
template<typename T>
T CubicInterpolationTable< T >::operator() ( double  y) const
inline
template<typename T>
T CubicInterpolationTable< T >::operator() ( double  y) const
inline

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