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::Spline;
8use base qw(Exporter);
9use base qw(DynaLoader);
10package Math::GSL::Splinec;
11bootstrap Math::GSL::Spline;
12package Math::GSL::Spline;
13@EXPORT = qw();
14
15# ---------- BASE METHODS -------------
16
17package Math::GSL::Spline;
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::Spline;
51
52*gsl_error = *Math::GSL::Splinec::gsl_error;
53*gsl_stream_printf = *Math::GSL::Splinec::gsl_stream_printf;
54*gsl_strerror = *Math::GSL::Splinec::gsl_strerror;
55*gsl_set_error_handler = *Math::GSL::Splinec::gsl_set_error_handler;
56*gsl_set_error_handler_off = *Math::GSL::Splinec::gsl_set_error_handler_off;
57*gsl_set_stream_handler = *Math::GSL::Splinec::gsl_set_stream_handler;
58*gsl_set_stream = *Math::GSL::Splinec::gsl_set_stream;
59*gsl_spline_alloc = *Math::GSL::Splinec::gsl_spline_alloc;
60*gsl_spline_init = *Math::GSL::Splinec::gsl_spline_init;
61*gsl_spline_name = *Math::GSL::Splinec::gsl_spline_name;
62*gsl_spline_min_size = *Math::GSL::Splinec::gsl_spline_min_size;
63*gsl_spline_eval_e = *Math::GSL::Splinec::gsl_spline_eval_e;
64*gsl_spline_eval = *Math::GSL::Splinec::gsl_spline_eval;
65*gsl_spline_eval_deriv_e = *Math::GSL::Splinec::gsl_spline_eval_deriv_e;
66*gsl_spline_eval_deriv = *Math::GSL::Splinec::gsl_spline_eval_deriv;
67*gsl_spline_eval_deriv2_e = *Math::GSL::Splinec::gsl_spline_eval_deriv2_e;
68*gsl_spline_eval_deriv2 = *Math::GSL::Splinec::gsl_spline_eval_deriv2;
69*gsl_spline_eval_integ_e = *Math::GSL::Splinec::gsl_spline_eval_integ_e;
70*gsl_spline_eval_integ = *Math::GSL::Splinec::gsl_spline_eval_integ;
71*gsl_spline_free = *Math::GSL::Splinec::gsl_spline_free;
72
73############# Class : Math::GSL::Spline::gsl_spline ##############
74
75package Math::GSL::Spline::gsl_spline;
76use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
77@ISA = qw( Math::GSL::Spline );
78%OWNER = ();
79%ITERATORS = ();
80*swig_interp_get = *Math::GSL::Splinec::gsl_spline_interp_get;
81*swig_interp_set = *Math::GSL::Splinec::gsl_spline_interp_set;
82*swig_x_get = *Math::GSL::Splinec::gsl_spline_x_get;
83*swig_x_set = *Math::GSL::Splinec::gsl_spline_x_set;
84*swig_y_get = *Math::GSL::Splinec::gsl_spline_y_get;
85*swig_y_set = *Math::GSL::Splinec::gsl_spline_y_set;
86*swig_size_get = *Math::GSL::Splinec::gsl_spline_size_get;
87*swig_size_set = *Math::GSL::Splinec::gsl_spline_size_set;
88sub new {
89    my $pkg = shift;
90    my $self = Math::GSL::Splinec::new_gsl_spline(@_);
91    bless $self, $pkg if defined($self);
92}
93
94sub DESTROY {
95    return unless $_[0]->isa('HASH');
96    my $self = tied(%{$_[0]});
97    return unless defined $self;
98    delete $ITERATORS{$self};
99    if (exists $OWNER{$self}) {
100        Math::GSL::Splinec::delete_gsl_spline($self);
101        delete $OWNER{$self};
102    }
103}
104
105sub DISOWN {
106    my $self = shift;
107    my $ptr = tied(%$self);
108    delete $OWNER{$ptr};
109}
110
111sub ACQUIRE {
112    my $self = shift;
113    my $ptr = tied(%$self);
114    $OWNER{$ptr} = 1;
115}
116
117
118# ------- VARIABLE STUBS --------
119
120package Math::GSL::Spline;
121
122*GSL_VERSION = *Math::GSL::Splinec::GSL_VERSION;
123*GSL_MAJOR_VERSION = *Math::GSL::Splinec::GSL_MAJOR_VERSION;
124*GSL_MINOR_VERSION = *Math::GSL::Splinec::GSL_MINOR_VERSION;
125*GSL_POSZERO = *Math::GSL::Splinec::GSL_POSZERO;
126*GSL_NEGZERO = *Math::GSL::Splinec::GSL_NEGZERO;
127*GSL_SUCCESS = *Math::GSL::Splinec::GSL_SUCCESS;
128*GSL_FAILURE = *Math::GSL::Splinec::GSL_FAILURE;
129*GSL_CONTINUE = *Math::GSL::Splinec::GSL_CONTINUE;
130*GSL_EDOM = *Math::GSL::Splinec::GSL_EDOM;
131*GSL_ERANGE = *Math::GSL::Splinec::GSL_ERANGE;
132*GSL_EFAULT = *Math::GSL::Splinec::GSL_EFAULT;
133*GSL_EINVAL = *Math::GSL::Splinec::GSL_EINVAL;
134*GSL_EFAILED = *Math::GSL::Splinec::GSL_EFAILED;
135*GSL_EFACTOR = *Math::GSL::Splinec::GSL_EFACTOR;
136*GSL_ESANITY = *Math::GSL::Splinec::GSL_ESANITY;
137*GSL_ENOMEM = *Math::GSL::Splinec::GSL_ENOMEM;
138*GSL_EBADFUNC = *Math::GSL::Splinec::GSL_EBADFUNC;
139*GSL_ERUNAWAY = *Math::GSL::Splinec::GSL_ERUNAWAY;
140*GSL_EMAXITER = *Math::GSL::Splinec::GSL_EMAXITER;
141*GSL_EZERODIV = *Math::GSL::Splinec::GSL_EZERODIV;
142*GSL_EBADTOL = *Math::GSL::Splinec::GSL_EBADTOL;
143*GSL_ETOL = *Math::GSL::Splinec::GSL_ETOL;
144*GSL_EUNDRFLW = *Math::GSL::Splinec::GSL_EUNDRFLW;
145*GSL_EOVRFLW = *Math::GSL::Splinec::GSL_EOVRFLW;
146*GSL_ELOSS = *Math::GSL::Splinec::GSL_ELOSS;
147*GSL_EROUND = *Math::GSL::Splinec::GSL_EROUND;
148*GSL_EBADLEN = *Math::GSL::Splinec::GSL_EBADLEN;
149*GSL_ENOTSQR = *Math::GSL::Splinec::GSL_ENOTSQR;
150*GSL_ESING = *Math::GSL::Splinec::GSL_ESING;
151*GSL_EDIVERGE = *Math::GSL::Splinec::GSL_EDIVERGE;
152*GSL_EUNSUP = *Math::GSL::Splinec::GSL_EUNSUP;
153*GSL_EUNIMPL = *Math::GSL::Splinec::GSL_EUNIMPL;
154*GSL_ECACHE = *Math::GSL::Splinec::GSL_ECACHE;
155*GSL_ETABLE = *Math::GSL::Splinec::GSL_ETABLE;
156*GSL_ENOPROG = *Math::GSL::Splinec::GSL_ENOPROG;
157*GSL_ENOPROGJ = *Math::GSL::Splinec::GSL_ENOPROGJ;
158*GSL_ETOLF = *Math::GSL::Splinec::GSL_ETOLF;
159*GSL_ETOLX = *Math::GSL::Splinec::GSL_ETOLX;
160*GSL_ETOLG = *Math::GSL::Splinec::GSL_ETOLG;
161*GSL_EOF = *Math::GSL::Splinec::GSL_EOF;
162
163@EXPORT_OK = qw/
164               gsl_spline_alloc
165               gsl_spline_init
166               gsl_spline_name
167               gsl_spline_min_size
168               gsl_spline_eval_e
169               gsl_spline_eval
170               gsl_spline_eval_deriv_e
171               gsl_spline_eval_deriv
172               gsl_spline_eval_deriv2_e
173               gsl_spline_eval_deriv2
174               gsl_spline_eval_integ_e
175               gsl_spline_eval_integ
176               gsl_spline_free
177             /;
178%EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
179
180__END__
181
182=encoding utf8
183
184=head1 NAME
185
186Math::GSL::Spline - Splines
187
188=head1 SYNOPSIS
189
190    use Math::GSL::Spline qw/:all/;
191
192=head1 DESCRIPTION
193
194The functions described in the Interp module required the user to supply
195pointers to the x and y arrays on each call. The following functions are
196equivalent to the corresponding gsl_interp functions but maintain a copy of
197this data in the gsl_spline object. This removes the need to pass both xa and
198ya as arguments on each evaluation.
199
200=over
201
202=item * C<gsl_spline_alloc($T, $size)>
203
204=item * C<gsl_spline_init($spline, $xa, $ya, $size)>
205
206=item * C<gsl_spline_free($spline)>
207
208=item * C<gsl_spline_name($spline)>
209
210=item * C<gsl_spline_min_size($spline)>
211
212=item * C<gsl_spline_eval_e($spline, $x, $acc)>
213
214=item * C<gsl_spline_eval($spline, $x, $acc)>
215
216=item * C<gsl_spline_eval_deriv_e($spline, $x, $acc)>
217
218=item * C<gsl_spline_eval_deriv($spline, $x, $acc)>
219
220=item * C<gsl_spline_eval_deriv2_e($spline, $x, $acc)>
221
222=item * C<gsl_spline_eval_deriv2($spline, $x, $acc)>
223
224=item * C<gsl_spline_eval_integ_e($spline, $a, $b, $acc)>
225
226=item * C<gsl_spline_eval_integ($spline, $a, $b, $acc)>
227
228=back
229
230For more informations on the functions, we refer you to the GSL official
231documentation: L<http://www.gnu.org/software/gsl/manual/html_node/>
232
233
234=head1 AUTHORS
235
236Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
237
238=head1 COPYRIGHT AND LICENSE
239
240Copyright (C) 2008-2021 Jonathan "Duke" Leto and Thierry Moisan
241
242This program is free software; you can redistribute it and/or modify it
243under the same terms as Perl itself.
244
245=cut
246
247
2481;
249