Math::GSL::Chebyshev(3pm)

Math::GSL::Chebyshev3pm

Univariate chebyshev series approximation

Usage

    use Math::GSL::Chebyshev qw/:all/;
    my $cheb             = gsl_cheb_alloc(40);
    my $function         = sub { sin(cos($_[0])) };
    gsl_cheb_init($cheb, $function, 0, 10);
    my $x                = gsl_cheb_eval($cheb, 5.5 );
    my ($status,$y,$err) = gsl_cheb_eval_err($cheb, 7.5 );
    gsl_cheb_free($cheb);

Overview

•

gsl_cheb_alloc($size)

    my $cheb = gsl_cheb_alloc(50);

Allocates a new Chebyshev object with $size sample points.

•

gsl_cheb_free($cheb)

Deallocates memory associated to $cheb. Returns void.

•

"gsl_cheb_init($cheb,$function, $lower, $upper)"

    gsl_cheb_init($cheb, sub { sin(cos($_[0])) }, 0, 10 );

Initiate a Chebyshev object with a function and upper and lower bounds. Returns void.

•

"gsl_cheb_eval($function, $value)"

    my $evaluated = gsl_cheb_eval($cheb, 5 );

Returns a Perl scalar of the Chebyshev object $cheb evaluated at $value.

•

"gsl_cheb_eval_err($cheb, $value)"

    my ($status,$evaluated,$err) = gsl_cheb_eval($cheb, 5 );

Returns a list consisting of a GSL status code, the evaluate value and the estimated error of the evaluation.

•

"gsl_cheb_eval_n "

•

"gsl_cheb_eval_n_err "

•

"gsl_cheb_eval_mode "

•

"gsl_cheb_eval_mode_e "

•

"gsl_cheb_calc_deriv($deriv,$cheb) "

   my $status = gsl_cheb_calc_deriv( $deriv, $cheb );

This will calculate the derivative of $cheb and stores it in $deriv, which must be pre-allocated. Returns a GSL status code.

•

"gsl_cheb_calc_integ($integ,$cheb) "

   my $status = gsl_cheb_calc_integ( $deriv, $cheb );

This will calculate the derivative of $cheb and stores it in $deriv, which must be pre-allocated. Returns a GSL status code.

For more information on the functions, we refer you to the GSL official documentation: <http://www.gnu.org/software/gsl/manual/html_node/>

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

Authors

Jonathan "Duke" Leto <[email protected]> and Thierry Moisan <[email protected]>

From libmath-gsl-perl 0.45-2+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.