Title: Chebyshev Approximations

A Chebyshev series is stored using the GSL::Cheb class.

1 Class methods

GSL::Cheb.new(n)
GSL::Cheb.alloc(n)
This create an instance of the GSL::Cheb class for a Chebyshev series of order n.

2 Methods

GSL::Cheb#init(f, a, b)
This computes the Chebyshev approximation the function f over the range (a,b) to the previously specified order. Where f is a GSL::Function object. The computation of the Chebyshev approximation is an O(n^2) process, and requires n function evaluations.
GSL::Cheb#eval(x)
This evaluates the Chebyshev series at a given point x.
GSL::Cheb#eval_n(n, x)
This evaluates the Chebyshev series at a given point x, to (at most) the given order n.
GSL::Cheb#calc_deriv()
GSL::Cheb#deriv()
This computes the derivative of the series, and returns a new GSL::Cheb object which contains the computed derivative. The reciever is not changed.
GSL::Cheb#calc_integ()
GSL::Cheb#integ()
This computes the integral of the series, and returns a new GSL::Cheb object which contains the computed integral coefficients. The reciever is not changed.

See also the example script, samples/cheb.rb.

back