1 %module
"Math::GSL::Deriv"
2 // Danger Will Robinson
, for realz
!
5 %include
"gsl_typemaps.i"
6 %typemap
(argout
) (const gsl_function
*f
,
8 double
*result
, double
*abserr
) {
12 sv
= hv_fetch
(Callbacks
, (char
*)&$input, sizeof($input), FALSE );
14 croak
("Math::GSL(argout) : Missing callback!\n");
18 // these are the arguments passed to the callback
19 XPUSHs
(sv_2mortal
(newSViv
((int
)$
2)));
22 /* This actually calls the perl subroutine
*/
23 call_sv
(*sv
, G_SCALAR
);
25 //av_push
(av
, newSVnv
((double
) *$
4));
26 //av_push
(av
, newSVnv
((double
) *$
5));
27 //$result
= sv_2mortal
( newRV_noinc
( (SV
*) av
) );
28 $result
= sv_newmortal
();
29 sv_setnv
($result
, (double
) *$
4);
31 sv_setnv
($result
, (double
) *$
5);
41 $
1 = (double
*) $input
;
44 #include
"gsl/gsl_math.h"
45 #include
"gsl/gsl_deriv.h"
48 %include
"gsl/gsl_math.h"
49 %include
"gsl/gsl_deriv.h"
57 %EXPORT_TAGS
= ( all
=> [ @EXPORT_OK
] );
63 Math
::GSL
::Deriv
- Numerical Derivatives
68 use Math
::GSL
::Deriv qw
/:all
/;
72 Here is a list of all the functions in this module
:
76 =item
* C
<gsl_deriv_central
>
78 =item
* C
<gsl_deriv_backward
>
80 =item
* C
<gsl_deriv_forward
>
84 For more informations on the functions
, we refer you to the GSL offcial
85 documentation
: L
<http
://www.gnu.org
/software
/gsl
/manual
/html_node
/>
87 Tip
: search on google
: site
:http
://www.gnu.org
/software
/gsl
/manual
/html_node
/ name_of_the_function_you_want
92 Jonathan Leto
<jonathan@leto.net
> and Thierry Moisan
<thierry.moisan@gmail.com
>
94 =head1 COPYRIGHT
AND LICENSE
96 Copyright
(C
) 2008 Jonathan Leto and Thierry Moisan
98 This program is free software
; you can redistribute it and
/or modify it
99 under the same terms as Perl itself.