1 %module
"Math::GSL::Deriv"
3 struct gsl_function_struct
5 double
(* function
) (double x
, void
* params
);
9 typedef struct gsl_function_struct gsl_function
;
10 #define GSL_FN_EVAL
(F
,x
) (*((F
)->function
))(x
,(F
)->params
)
14 %typemap
(in
) gsl_function
* {
18 F.function
= &xsquared;
20 if
( !SvROK
($input
) ) {
21 croak
("Math::GSL : not a reference value!");
23 //Perl_sv_dump
( $input
);
26 //count
= call_sv
((SV
*) $input
, G_ARRAY
);
31 typedef struct callback_t
35 double xsquared
(double x
,void
*params
){
41 $
1 = (double
*) $input
;
43 %typemap
(in
) double
(*)(double
,void
*) {
44 fprintf
(stderr
,"input * %d \n", (int
) $input
);
45 //Perl_sv_dump
( $input
);
48 %apply double
* OUTPUT { double
*abserr
, double
*result
};
51 #include
"gsl/gsl_math.h"
52 #include
"gsl/gsl_deriv.h"
55 %include
"gsl/gsl_math.h"
56 %include
"gsl/gsl_deriv.h"
64 %EXPORT_TAGS
= ( all
=> [ @EXPORT_OK
] );
70 Math
::GSL
::Deriv
- Functions to compute numerical derivatives by finite differencing
74 This module is not yet implemented. Patches Welcome
!
76 use Math
::GSL
::Deriv qw
/:all
/;
80 Here is a list of all the functions in this module
:
84 =item
* C
<gsl_deriv_central
>
86 =item
* C
<gsl_deriv_backward
>
88 =item
* C
<gsl_deriv_forward
>
92 For more informations on the functions
, we refer you to the GSL offcial
93 documentation
: L
<http
://www.gnu.org
/software
/gsl
/manual
/html_node
/>
95 Tip
: search on google
: site
:http
://www.gnu.org
/software
/gsl
/manual
/html_node
/ name_of_the_function_you_want
100 Jonathan Leto
<jonathan@leto.net
> and Thierry Moisan
<thierry.moisan@gmail.com
>
102 =head1 COPYRIGHT
AND LICENSE
104 Copyright
(C
) 2008 Jonathan Leto and Thierry Moisan
106 This program is free software
; you can redistribute it and
/or modify it
107 under the same terms as Perl itself.