Disabling SWIG in that manner did not work
[Math-GSL.git] / Chebyshev.i
blobebae231eaf0f32867e1765b78cb89522859c5c62
1 %module "Math::GSL::Chebyshev"
2 %include "typemaps.i"
3 %include "gsl_typemaps.i"
4 %{
5 #include "gsl/gsl_chebyshev.h"
6 #include "gsl/gsl_math.h"
7 #include "gsl/gsl_mode.h"
8 %}
9 %include "gsl/gsl_chebyshev.h"
10 %include "gsl/gsl_math.h"
11 %include "gsl/gsl_mode.h"
14 %perlcode %{
15 @EXPORT_OK = qw/
16 gsl_cheb_alloc
17 gsl_cheb_free
18 gsl_cheb_init
19 gsl_cheb_eval
20 gsl_cheb_eval_err
21 gsl_cheb_eval_n
22 gsl_cheb_eval_n_err
23 gsl_cheb_eval_mode
24 gsl_cheb_eval_mode_e
25 gsl_cheb_calc_deriv
26 gsl_cheb_calc_integ
28 %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
30 __END__
32 =head1 NAME
34 Math::GSL::Chebyshev - Univariate Chebyshev Series Approximation
36 =head1 SYNOPSIS
38 use Math::GSL::Chebyshev qw /:all/;
40 my $cheb = gsl_cheb_alloc(40);
41 my $function = sub { sin(cos($_[0])) };
43 gsl_cheb_init($cheb, $function, 0, 10);
45 my $x = gsl_cheb_eval($cheb, 5.5 );
46 my ($status,$y,$err) = gsl_cheb_eval_err($cheb, 7.5 );
47 gsl_cheb_free($cheb);
49 =head1 DESCRIPTION
51 Here is a list of all the functions in this module :
53 =over
55 =item * C<gsl_cheb_alloc($size)>
57 my $cheb = gsl_cheb_alloc(50);
59 Allocates a new Chebyshev object with $size sample points.
61 =item * C<gsl_cheb_free($cheb)>
63 Deallocates memory associated to $cheb. Returns void.
65 =item * C<gsl_cheb_init($cheb,$function, $lower, $upper)>
67 gsl_cheb_init($cheb, sub { sin(cos($_[0])) }, 0, 10 );
69 Initiate a Chebyshev object with a function and upper and lower bounds.
70 Returns void.
72 =item * C<gsl_cheb_eval($function, $value)>
74 my $evaluated = gsl_cheb_eval($cheb, 5 );
76 Returns a Perl scalar of the Chebyshev object $cheb evaluated at $value.
78 =item * C<gsl_cheb_eval_err($cheb, $value)>
80 my ($status,$evaluated,$err) = gsl_cheb_eval($cheb, 5 );
82 Returns a list consisting of a GSL status code, the evaluate value and
83 the estimated error of the evaluation.
85 =item * C<gsl_cheb_eval_n >
87 =item * C<gsl_cheb_eval_n_err >
89 =item * C<gsl_cheb_eval_mode >
91 =item * C<gsl_cheb_eval_mode_e >
93 =item * C<gsl_cheb_calc_deriv($deriv,$cheb) >
95 my $status = gsl_cheb_calc_deriv( $deriv, $cheb );
97 This will calculate the derivative of $cheb and stores it
98 in $deriv, which must be pre-allocated. Returns a GSL status code.
100 =item * C<gsl_cheb_calc_integ($integ,$cheb) >
102 my $status = gsl_cheb_calc_integ( $deriv, $cheb );
104 This will calculate the derivative of $cheb and stores it
105 in $deriv, which must be pre-allocated. Returns a GSL status code.
107 =back
109 For more informations on the functions, we refer you to the GSL offcial
110 documentation: L<http://www.gnu.org/software/gsl/manual/html_node/>
112 Tip : search on google: site:http://www.gnu.org/software/gsl/manual/html_node/ name_of_the_function_you_want
115 =head1 AUTHORS
117 Jonathan Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
119 =head1 COPYRIGHT AND LICENSE
121 Copyright (C) 2008 Jonathan Leto and Thierry Moisan
123 This program is free software; you can redistribute it and/or modify it
124 under the same terms as Perl itself.
126 =cut