6. pygsl.chebyshev

class cheb_series( )
This base class can be instantiated by its name
import pygsl.chebyshev
s=pygsl.chebyshev.cheb_series()

__init__( n)
n ... number of coefficients
init( f, a, b)
This function computes the Chebyshev approximation for the function F over the range (a,b) to the previously specified order. The computation of the Chebyshev approximation is an O($ n^2$ ) process, and requires n function evaluations.

f ... a gsl_function a ... lower limit b ... upper limit

eval( x)
This function evaluates the Chebyshev series at a given point X.
eval_err( x)
This function computes the Chebyshev series at a given point X, estimating both the series RESULT and its absolute error ABSERR. The error estimate is made from the first neglected term in the series.
eval_n( n, x)
This function evaluates the Chebyshev series at a given point x, to (at most) the given order n
eval_n_err( n, x)
This function evaluates a Chebyshev series at a given point X, estimating both the series RESULT and its absolute error ABSERR, to (at most) the given order ORDER. The error estimate is made from the first neglected term in the series.

calc_deriv( )
This method computes the derivative of the series CS. It returns a new instance of the cheb_series class.
calc_integ( )
This method computes the integral of the series CS. It returns a new instance of the cheb_series class.
get_a( )
Get the lower boundary of the current representation
get_b( )
Get the upper boundary of the current representation
get_coefficients( )
Get the chebyshev coefficients.
get_f( )
Get the value f (what is it ?) The documentation does not tell anything about it.
get_order_sp( )
Get the value f (what is it ?) The documentation does not tell anything about it.
set_a( )
Set the lower boundary of the current representation
set_b( )
Set the upper boundary of the current
set_coefficients( )
Sets the chebyshev coefficients.
set_f( f)
Set the value f (what is it ?)
set_order_sp( ...)
Set the value f (what is it ?)

gsl_function( f, params)

This class defines the callbacks known as gsl_function to gsl.

e.g to supply the function f:

def f(x, params): a = params[0] b = parmas[1] c = params[3] return a * x ** 2 + b * x + c

to some solver, use

function = gsl_function(f, params)