gsl_chebapp Class Template Reference

#include <gsl_chebapp.h>


Detailed Description

template<class param_t, class func_t>
class gsl_chebapp< param_t, func_t >

Chebyshev approximation (GSL).

Approximate a function using a Chebyshev series:

\[ f(x) = \sum_n c_n T_n(x) \qquad \mathrm{where} \qquad T_n(x)=\cos(n \arccos x) \]

Definition at line 44 of file gsl_chebapp.h.


Public Member Functions

 gsl_chebapp ()
int init (func_t &func, double a, double b, param_t &vp)
 Initialize a Chebyshev approximation of the function func over the interval from a to b.
int set_order (size_t o)
 Set the order (default 5).
double eval (double x)
 Evaluate the approximation.
gsl_chebappderiv ()
 Return a pointer to an approximation to the derivative.
gsl_chebappinte ()
 Return a pointer to an approximation to the integral.
double get_coefficient (size_t ix)
 Get the coefficient.

Member Function Documentation

int init ( func_t &  func,
double  a,
double  b,
param_t &  vp 
) [inline]

Initialize a Chebyshev approximation of the function func over the interval from a to b.

The interval must be specified so that $ a < b $ .

Definition at line 58 of file gsl_chebapp.h.

int set_order ( size_t  o  )  [inline]

Set the order (default 5).

The function init() must be called after calling set_order() to reinitialize the series for the new order.

Definition at line 95 of file gsl_chebapp.h.

gsl_chebapp* deriv (  )  [inline]

Return a pointer to an approximation to the derivative.

The new gsl_chebapp object is allocated by new, and the memory should be deallocated using delete by the user.

Definition at line 120 of file gsl_chebapp.h.

gsl_chebapp* inte (  )  [inline]

Return a pointer to an approximation to the integral.

The new gsl_chebapp object is allocated by new, and the memory should be deallocated using delete by the user.

Definition at line 139 of file gsl_chebapp.h.

double get_coefficient ( size_t  ix  )  [inline]

Get the coefficient.

Legal values of the argument are 0 to order+1

Definition at line 157 of file gsl_chebapp.h.


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

Documentation generated with Doxygen and provided under the GNU Free Documentation License. See License Information for details.

Project hosting provided by SourceForge.net Logo, O2scl Sourceforge Project Page