1# This file was automatically generated by SWIG (http://www.swig.org).
2# Version 4.0.1
3#
4# Do not make changes to this file unless you know what you are doing--modify
5# the SWIG interface file instead.
6
7package Math::GSL::Diff;
8use base qw(Exporter);
9use base qw(DynaLoader);
10package Math::GSL::Diffc;
11bootstrap Math::GSL::Diff;
12package Math::GSL::Diff;
13@EXPORT = qw();
14
15# ---------- BASE METHODS -------------
16
17package Math::GSL::Diff;
18
19sub TIEHASH {
20    my ($classname,$obj) = @_;
21    return bless $obj, $classname;
22}
23
24sub CLEAR { }
25
26sub FIRSTKEY { }
27
28sub NEXTKEY { }
29
30sub FETCH {
31    my ($self,$field) = @_;
32    my $member_func = "swig_${field}_get";
33    $self->$member_func();
34}
35
36sub STORE {
37    my ($self,$field,$newval) = @_;
38    my $member_func = "swig_${field}_set";
39    $self->$member_func($newval);
40}
41
42sub this {
43    my $ptr = shift;
44    return tied(%$ptr);
45}
46
47
48# ------- FUNCTION WRAPPERS --------
49
50package Math::GSL::Diff;
51
52*gsl_error = *Math::GSL::Diffc::gsl_error;
53*gsl_stream_printf = *Math::GSL::Diffc::gsl_stream_printf;
54*gsl_strerror = *Math::GSL::Diffc::gsl_strerror;
55*gsl_set_error_handler = *Math::GSL::Diffc::gsl_set_error_handler;
56*gsl_set_error_handler_off = *Math::GSL::Diffc::gsl_set_error_handler_off;
57*gsl_set_stream_handler = *Math::GSL::Diffc::gsl_set_stream_handler;
58*gsl_set_stream = *Math::GSL::Diffc::gsl_set_stream;
59*gsl_diff_central = *Math::GSL::Diffc::gsl_diff_central;
60*gsl_diff_backward = *Math::GSL::Diffc::gsl_diff_backward;
61*gsl_diff_forward = *Math::GSL::Diffc::gsl_diff_forward;
62
63# ------- VARIABLE STUBS --------
64
65package Math::GSL::Diff;
66
67*GSL_VERSION = *Math::GSL::Diffc::GSL_VERSION;
68*GSL_MAJOR_VERSION = *Math::GSL::Diffc::GSL_MAJOR_VERSION;
69*GSL_MINOR_VERSION = *Math::GSL::Diffc::GSL_MINOR_VERSION;
70*GSL_POSZERO = *Math::GSL::Diffc::GSL_POSZERO;
71*GSL_NEGZERO = *Math::GSL::Diffc::GSL_NEGZERO;
72*GSL_SUCCESS = *Math::GSL::Diffc::GSL_SUCCESS;
73*GSL_FAILURE = *Math::GSL::Diffc::GSL_FAILURE;
74*GSL_CONTINUE = *Math::GSL::Diffc::GSL_CONTINUE;
75*GSL_EDOM = *Math::GSL::Diffc::GSL_EDOM;
76*GSL_ERANGE = *Math::GSL::Diffc::GSL_ERANGE;
77*GSL_EFAULT = *Math::GSL::Diffc::GSL_EFAULT;
78*GSL_EINVAL = *Math::GSL::Diffc::GSL_EINVAL;
79*GSL_EFAILED = *Math::GSL::Diffc::GSL_EFAILED;
80*GSL_EFACTOR = *Math::GSL::Diffc::GSL_EFACTOR;
81*GSL_ESANITY = *Math::GSL::Diffc::GSL_ESANITY;
82*GSL_ENOMEM = *Math::GSL::Diffc::GSL_ENOMEM;
83*GSL_EBADFUNC = *Math::GSL::Diffc::GSL_EBADFUNC;
84*GSL_ERUNAWAY = *Math::GSL::Diffc::GSL_ERUNAWAY;
85*GSL_EMAXITER = *Math::GSL::Diffc::GSL_EMAXITER;
86*GSL_EZERODIV = *Math::GSL::Diffc::GSL_EZERODIV;
87*GSL_EBADTOL = *Math::GSL::Diffc::GSL_EBADTOL;
88*GSL_ETOL = *Math::GSL::Diffc::GSL_ETOL;
89*GSL_EUNDRFLW = *Math::GSL::Diffc::GSL_EUNDRFLW;
90*GSL_EOVRFLW = *Math::GSL::Diffc::GSL_EOVRFLW;
91*GSL_ELOSS = *Math::GSL::Diffc::GSL_ELOSS;
92*GSL_EROUND = *Math::GSL::Diffc::GSL_EROUND;
93*GSL_EBADLEN = *Math::GSL::Diffc::GSL_EBADLEN;
94*GSL_ENOTSQR = *Math::GSL::Diffc::GSL_ENOTSQR;
95*GSL_ESING = *Math::GSL::Diffc::GSL_ESING;
96*GSL_EDIVERGE = *Math::GSL::Diffc::GSL_EDIVERGE;
97*GSL_EUNSUP = *Math::GSL::Diffc::GSL_EUNSUP;
98*GSL_EUNIMPL = *Math::GSL::Diffc::GSL_EUNIMPL;
99*GSL_ECACHE = *Math::GSL::Diffc::GSL_ECACHE;
100*GSL_ETABLE = *Math::GSL::Diffc::GSL_ETABLE;
101*GSL_ENOPROG = *Math::GSL::Diffc::GSL_ENOPROG;
102*GSL_ENOPROGJ = *Math::GSL::Diffc::GSL_ENOPROGJ;
103*GSL_ETOLF = *Math::GSL::Diffc::GSL_ETOLF;
104*GSL_ETOLX = *Math::GSL::Diffc::GSL_ETOLX;
105*GSL_ETOLG = *Math::GSL::Diffc::GSL_ETOLG;
106*GSL_EOF = *Math::GSL::Diffc::GSL_EOF;
107
108@EXPORT_OK = qw/
109               gsl_diff_central
110               gsl_diff_backward
111               gsl_diff_forward
112             /;
113%EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
114
115__END__
116
117=encoding utf8
118
119=head1 NAME
120
121Math::GSL::Diff - Numerical differentiation routines
122
123=head1 SYNOPSIS
124
125    use Math::GSL::Diff qw/:all/;
126
127=head1 DESCRIPTION
128
129Here is a list of all the functions included in this module :
130
131=over
132
133=item C<gsl_diff_central>
134
135This function computes the numerical derivative of the function f
136at the point x using an adaptive central difference algorithm.
137The result is an array where the first position is an error code (0 for success),
138the second is derivative value, and the third is an estimate of its absolute error.
139
140   my ($success, $result, $error) =
141         gsl_diff_central(sub { return $_[0] ** 1.5 }, 2.0);
142
143=item C<gsl_diff_backward>
144
145This function computes the numerical derivative of the function f
146at the point x using an adaptive forward difference algorithm.
147Its usage is similar to C<gsl_diff_central>.
148
149   my ($success, $result, $error) =
150          gsl_diff_backward(sub { return $_[0] ** 1.5 }, 0.0);
151
152
153=item C<gsl_diff_forward>
154
155This function computes the numerical derivative of the
156function f at the point x using an adaptive backward difference algorithm.
157Its usage is similar to C<gsl_diff_central>.
158
159   my ($success, $result, $error) =
160          gsl_diff_forward(sub { return $_[0] ** 1.5 }, 1.0);
161
162
163=back
164
165=head1 EXAMPLES
166
167=head1 AUTHORS
168
169Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
170
171=head1 COPYRIGHT AND LICENSE
172
173Copyright (C) 2008-2021 Jonathan "Duke" Leto and Thierry Moisan
174
175This program is free software; you can redistribute it and/or modify it
176under the same terms as Perl itself.
177
178=cut
1791;
180