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::BSpline;
8use base qw(Exporter);
9use base qw(DynaLoader);
10package Math::GSL::BSplinec;
11bootstrap Math::GSL::BSpline;
12package Math::GSL::BSpline;
13@EXPORT = qw();
14
15# ---------- BASE METHODS -------------
16
17package Math::GSL::BSpline;
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::BSpline;
51
52*gsl_error = *Math::GSL::BSplinec::gsl_error;
53*gsl_stream_printf = *Math::GSL::BSplinec::gsl_stream_printf;
54*gsl_strerror = *Math::GSL::BSplinec::gsl_strerror;
55*gsl_set_error_handler = *Math::GSL::BSplinec::gsl_set_error_handler;
56*gsl_set_error_handler_off = *Math::GSL::BSplinec::gsl_set_error_handler_off;
57*gsl_set_stream_handler = *Math::GSL::BSplinec::gsl_set_stream_handler;
58*gsl_set_stream = *Math::GSL::BSplinec::gsl_set_stream;
59*gsl_bspline_alloc = *Math::GSL::BSplinec::gsl_bspline_alloc;
60*gsl_bspline_free = *Math::GSL::BSplinec::gsl_bspline_free;
61*gsl_bspline_ncoeffs = *Math::GSL::BSplinec::gsl_bspline_ncoeffs;
62*gsl_bspline_order = *Math::GSL::BSplinec::gsl_bspline_order;
63*gsl_bspline_nbreak = *Math::GSL::BSplinec::gsl_bspline_nbreak;
64*gsl_bspline_breakpoint = *Math::GSL::BSplinec::gsl_bspline_breakpoint;
65*gsl_bspline_greville_abscissa = *Math::GSL::BSplinec::gsl_bspline_greville_abscissa;
66*gsl_bspline_knots = *Math::GSL::BSplinec::gsl_bspline_knots;
67*gsl_bspline_knots_uniform = *Math::GSL::BSplinec::gsl_bspline_knots_uniform;
68*gsl_bspline_knots_greville = *Math::GSL::BSplinec::gsl_bspline_knots_greville;
69*gsl_bspline_eval = *Math::GSL::BSplinec::gsl_bspline_eval;
70
71############# Class : Math::GSL::BSpline::gsl_function_struct ##############
72
73package Math::GSL::BSpline::gsl_function_struct;
74use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
75@ISA = qw( Math::GSL::BSpline );
76%OWNER = ();
77%ITERATORS = ();
78*swig_function_get = *Math::GSL::BSplinec::gsl_function_struct_function_get;
79*swig_function_set = *Math::GSL::BSplinec::gsl_function_struct_function_set;
80*swig_params_get = *Math::GSL::BSplinec::gsl_function_struct_params_get;
81*swig_params_set = *Math::GSL::BSplinec::gsl_function_struct_params_set;
82sub new {
83    my $pkg = shift;
84    my $self = Math::GSL::BSplinec::new_gsl_function_struct(@_);
85    bless $self, $pkg if defined($self);
86}
87
88sub DESTROY {
89    return unless $_[0]->isa('HASH');
90    my $self = tied(%{$_[0]});
91    return unless defined $self;
92    delete $ITERATORS{$self};
93    if (exists $OWNER{$self}) {
94        Math::GSL::BSplinec::delete_gsl_function_struct($self);
95        delete $OWNER{$self};
96    }
97}
98
99sub DISOWN {
100    my $self = shift;
101    my $ptr = tied(%$self);
102    delete $OWNER{$ptr};
103}
104
105sub ACQUIRE {
106    my $self = shift;
107    my $ptr = tied(%$self);
108    $OWNER{$ptr} = 1;
109}
110
111
112############# Class : Math::GSL::BSpline::gsl_function_fdf_struct ##############
113
114package Math::GSL::BSpline::gsl_function_fdf_struct;
115use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
116@ISA = qw( Math::GSL::BSpline );
117%OWNER = ();
118%ITERATORS = ();
119*swig_f_get = *Math::GSL::BSplinec::gsl_function_fdf_struct_f_get;
120*swig_f_set = *Math::GSL::BSplinec::gsl_function_fdf_struct_f_set;
121*swig_df_get = *Math::GSL::BSplinec::gsl_function_fdf_struct_df_get;
122*swig_df_set = *Math::GSL::BSplinec::gsl_function_fdf_struct_df_set;
123*swig_fdf_get = *Math::GSL::BSplinec::gsl_function_fdf_struct_fdf_get;
124*swig_fdf_set = *Math::GSL::BSplinec::gsl_function_fdf_struct_fdf_set;
125*swig_params_get = *Math::GSL::BSplinec::gsl_function_fdf_struct_params_get;
126*swig_params_set = *Math::GSL::BSplinec::gsl_function_fdf_struct_params_set;
127sub new {
128    my $pkg = shift;
129    my $self = Math::GSL::BSplinec::new_gsl_function_fdf_struct(@_);
130    bless $self, $pkg if defined($self);
131}
132
133sub DESTROY {
134    return unless $_[0]->isa('HASH');
135    my $self = tied(%{$_[0]});
136    return unless defined $self;
137    delete $ITERATORS{$self};
138    if (exists $OWNER{$self}) {
139        Math::GSL::BSplinec::delete_gsl_function_fdf_struct($self);
140        delete $OWNER{$self};
141    }
142}
143
144sub DISOWN {
145    my $self = shift;
146    my $ptr = tied(%$self);
147    delete $OWNER{$ptr};
148}
149
150sub ACQUIRE {
151    my $self = shift;
152    my $ptr = tied(%$self);
153    $OWNER{$ptr} = 1;
154}
155
156
157############# Class : Math::GSL::BSpline::gsl_function_vec_struct ##############
158
159package Math::GSL::BSpline::gsl_function_vec_struct;
160use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
161@ISA = qw( Math::GSL::BSpline );
162%OWNER = ();
163%ITERATORS = ();
164*swig_function_get = *Math::GSL::BSplinec::gsl_function_vec_struct_function_get;
165*swig_function_set = *Math::GSL::BSplinec::gsl_function_vec_struct_function_set;
166*swig_params_get = *Math::GSL::BSplinec::gsl_function_vec_struct_params_get;
167*swig_params_set = *Math::GSL::BSplinec::gsl_function_vec_struct_params_set;
168sub new {
169    my $pkg = shift;
170    my $self = Math::GSL::BSplinec::new_gsl_function_vec_struct(@_);
171    bless $self, $pkg if defined($self);
172}
173
174sub DESTROY {
175    return unless $_[0]->isa('HASH');
176    my $self = tied(%{$_[0]});
177    return unless defined $self;
178    delete $ITERATORS{$self};
179    if (exists $OWNER{$self}) {
180        Math::GSL::BSplinec::delete_gsl_function_vec_struct($self);
181        delete $OWNER{$self};
182    }
183}
184
185sub DISOWN {
186    my $self = shift;
187    my $ptr = tied(%$self);
188    delete $OWNER{$ptr};
189}
190
191sub ACQUIRE {
192    my $self = shift;
193    my $ptr = tied(%$self);
194    $OWNER{$ptr} = 1;
195}
196
197
198# ------- VARIABLE STUBS --------
199
200package Math::GSL::BSpline;
201
202*GSL_VERSION = *Math::GSL::BSplinec::GSL_VERSION;
203*GSL_MAJOR_VERSION = *Math::GSL::BSplinec::GSL_MAJOR_VERSION;
204*GSL_MINOR_VERSION = *Math::GSL::BSplinec::GSL_MINOR_VERSION;
205*GSL_POSZERO = *Math::GSL::BSplinec::GSL_POSZERO;
206*GSL_NEGZERO = *Math::GSL::BSplinec::GSL_NEGZERO;
207*GSL_SUCCESS = *Math::GSL::BSplinec::GSL_SUCCESS;
208*GSL_FAILURE = *Math::GSL::BSplinec::GSL_FAILURE;
209*GSL_CONTINUE = *Math::GSL::BSplinec::GSL_CONTINUE;
210*GSL_EDOM = *Math::GSL::BSplinec::GSL_EDOM;
211*GSL_ERANGE = *Math::GSL::BSplinec::GSL_ERANGE;
212*GSL_EFAULT = *Math::GSL::BSplinec::GSL_EFAULT;
213*GSL_EINVAL = *Math::GSL::BSplinec::GSL_EINVAL;
214*GSL_EFAILED = *Math::GSL::BSplinec::GSL_EFAILED;
215*GSL_EFACTOR = *Math::GSL::BSplinec::GSL_EFACTOR;
216*GSL_ESANITY = *Math::GSL::BSplinec::GSL_ESANITY;
217*GSL_ENOMEM = *Math::GSL::BSplinec::GSL_ENOMEM;
218*GSL_EBADFUNC = *Math::GSL::BSplinec::GSL_EBADFUNC;
219*GSL_ERUNAWAY = *Math::GSL::BSplinec::GSL_ERUNAWAY;
220*GSL_EMAXITER = *Math::GSL::BSplinec::GSL_EMAXITER;
221*GSL_EZERODIV = *Math::GSL::BSplinec::GSL_EZERODIV;
222*GSL_EBADTOL = *Math::GSL::BSplinec::GSL_EBADTOL;
223*GSL_ETOL = *Math::GSL::BSplinec::GSL_ETOL;
224*GSL_EUNDRFLW = *Math::GSL::BSplinec::GSL_EUNDRFLW;
225*GSL_EOVRFLW = *Math::GSL::BSplinec::GSL_EOVRFLW;
226*GSL_ELOSS = *Math::GSL::BSplinec::GSL_ELOSS;
227*GSL_EROUND = *Math::GSL::BSplinec::GSL_EROUND;
228*GSL_EBADLEN = *Math::GSL::BSplinec::GSL_EBADLEN;
229*GSL_ENOTSQR = *Math::GSL::BSplinec::GSL_ENOTSQR;
230*GSL_ESING = *Math::GSL::BSplinec::GSL_ESING;
231*GSL_EDIVERGE = *Math::GSL::BSplinec::GSL_EDIVERGE;
232*GSL_EUNSUP = *Math::GSL::BSplinec::GSL_EUNSUP;
233*GSL_EUNIMPL = *Math::GSL::BSplinec::GSL_EUNIMPL;
234*GSL_ECACHE = *Math::GSL::BSplinec::GSL_ECACHE;
235*GSL_ETABLE = *Math::GSL::BSplinec::GSL_ETABLE;
236*GSL_ENOPROG = *Math::GSL::BSplinec::GSL_ENOPROG;
237*GSL_ENOPROGJ = *Math::GSL::BSplinec::GSL_ENOPROGJ;
238*GSL_ETOLF = *Math::GSL::BSplinec::GSL_ETOLF;
239*GSL_ETOLX = *Math::GSL::BSplinec::GSL_ETOLX;
240*GSL_ETOLG = *Math::GSL::BSplinec::GSL_ETOLG;
241*GSL_EOF = *Math::GSL::BSplinec::GSL_EOF;
242*GSL_DISABLE_DEPRECATED = *Math::GSL::BSplinec::GSL_DISABLE_DEPRECATED;
243*M_E = *Math::GSL::BSplinec::M_E;
244*M_LOG2E = *Math::GSL::BSplinec::M_LOG2E;
245*M_LOG10E = *Math::GSL::BSplinec::M_LOG10E;
246*M_SQRT2 = *Math::GSL::BSplinec::M_SQRT2;
247*M_SQRT1_2 = *Math::GSL::BSplinec::M_SQRT1_2;
248*M_SQRT3 = *Math::GSL::BSplinec::M_SQRT3;
249*M_PI = *Math::GSL::BSplinec::M_PI;
250*M_PI_2 = *Math::GSL::BSplinec::M_PI_2;
251*M_PI_4 = *Math::GSL::BSplinec::M_PI_4;
252*M_SQRTPI = *Math::GSL::BSplinec::M_SQRTPI;
253*M_2_SQRTPI = *Math::GSL::BSplinec::M_2_SQRTPI;
254*M_1_PI = *Math::GSL::BSplinec::M_1_PI;
255*M_2_PI = *Math::GSL::BSplinec::M_2_PI;
256*M_LN10 = *Math::GSL::BSplinec::M_LN10;
257*M_LN2 = *Math::GSL::BSplinec::M_LN2;
258*M_LNPI = *Math::GSL::BSplinec::M_LNPI;
259*M_EULER = *Math::GSL::BSplinec::M_EULER;
260
261@EXPORT_OK = qw/
262               gsl_bspline_alloc
263               gsl_bspline_free
264               gsl_bspline_ncoeffs
265               gsl_bspline_order
266               gsl_bspline_nbreak
267               gsl_bspline_breakpoint
268               gsl_bspline_knots
269               gsl_bspline_knots_uniform
270               gsl_bspline_eval
271             /;
272%EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
273
274__END__
275
276=encoding utf8
277
278=head1 NAME
279
280Math::GSL::BSpline - Functions for the computation of smoothing basis splines
281
282=head1 SYNOPSIS
283
284    use Math::GSL::BSpline qw/:all/;
285
286=head1 DESCRIPTION
287
288=over
289
290=item gsl_bspline_alloc($k, $nbreak)
291
292This function allocates a workspace for computing B-splines of order $k. The
293number of breakpoints is given by $nbreak. This leads to n = $nbreak + $k - 2
294basis functions. Cubic B-splines are specified by $k = 4.
295
296=item gsl_bspline_free($w)
297
298This function frees the memory associated with the workspace $w.
299
300=item gsl_bspline_ncoeffs($w)
301
302This function returns the number of B-spline coefficients given by n = nbreak + k - 2.
303
304=item gsl_bspline_order
305
306=item gsl_bspline_nbreak
307
308=item gsl_bspline_breakpoint
309
310=item gsl_bspline_knots($breakpts, $w)
311
312This function computes the knots associated with the given breakpoints inside
313the vector $breakpts and stores them internally in $w->{knots}.
314
315=item gsl_bspline_knots_uniform($a, $b, $w)
316
317This function assumes uniformly spaced breakpoints on [$a,$b] and constructs
318the corresponding knot vector using the previously specified nbreak parameter.
319The knots are stored in $w->{knots}.
320
321=item gsl_bspline_eval($x, $B, $w)
322
323This function evaluates all B-spline basis functions at the position $x and
324stores them in the vector $B, so that the ith element of $B is B_i($x). $B must
325be of length n = $nbreak + $k - 2. This value may also be obtained by calling
326gsl_bspline_ncoeffs. It is far more efficient to compute all of the basis
327functions at once than to compute them individually, due to the nature of the
328defining recurrence relation.
329
330For more informations on the functions, we refer you to the GSL official documentation:
331http://www.gnu.org/software/gsl/manual/html_node/
332
333=back
334
335=head1 EXAMPLES
336
337Coming soon.
338
339=head1 AUTHORS
340
341Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com>
342
343=head1 COPYRIGHT AND LICENSE
344
345Copyright (C) 2008-2021 Jonathan "Duke" Leto and Thierry Moisan
346
347This program is free software; you can redistribute it and/or modify it
348under the same terms as Perl itself.
349
350=cut
351
3521;
353