blib/lib/Math/GSL/Roots.pm untested

filter: Statementstmt 0.0% 0 / 237 Branchbran 0.0% 0 / 32 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 29 Podpod 0.0% 0 / 23 totaltotal 0.0% 0 / 321 CC 17 SCAR 22.1
CC
17
Cov
0%
DESTROY
20.0
DESTROY
20.0
DESTROY
20.0
CRAP 9.1
1 # This file was automatically generated by SWIG (https://www.swig.org).
2 # Version 4.2.0
3 #
4 # Do not make changes to this file unless you know what you are doing - modify
5 # the SWIG interface file instead.
6  
7 package Math::GSL::Roots;
8 use base qw(Exporter);
9 use base qw(DynaLoader);
10 package Math::GSL::Rootsc;
11 bootstrap Math::GSL::Roots;
12 package Math::GSL::Roots;
13 @EXPORT = qw();
14  
15 # ---------- BASE METHODS -------------
16  
17 package Math::GSL::Roots;
18  
19 sub TIEHASH {
20 my ($classname,$obj) = @_;
21 return bless $obj, $classname;
22 }
23  
24 sub CLEAR { }
25  
26 sub FIRSTKEY { }
27  
28 sub NEXTKEY { }
29  
30 sub FETCH {
31 my ($self,$field) = @_;
32 my $member_func = "swig_${field}_get";
33 $self->$member_func();
34 }
35  
36 sub STORE {
37 my ($self,$field,$newval) = @_;
38 my $member_func = "swig_${field}_set";
39 $self->$member_func($newval);
40 }
41  
42 sub this {
43 my $ptr = shift;
44 return tied(%$ptr);
45 }
46  
47  
48 # ------- FUNCTION WRAPPERS --------
49  
50 package Math::GSL::Roots;
51  
52 *gsl_error = *Math::GSL::Rootsc::gsl_error;
53 *gsl_stream_printf = *Math::GSL::Rootsc::gsl_stream_printf;
54 *gsl_strerror = *Math::GSL::Rootsc::gsl_strerror;
55 *gsl_set_error_handler = *Math::GSL::Rootsc::gsl_set_error_handler;
56 *gsl_set_error_handler_off = *Math::GSL::Rootsc::gsl_set_error_handler_off;
57 *gsl_set_stream_handler = *Math::GSL::Rootsc::gsl_set_stream_handler;
58 *gsl_set_stream = *Math::GSL::Rootsc::gsl_set_stream;
59 *gsl_root_fsolver_alloc = *Math::GSL::Rootsc::gsl_root_fsolver_alloc;
60 *gsl_root_fsolver_free = *Math::GSL::Rootsc::gsl_root_fsolver_free;
61 *gsl_root_fsolver_set = *Math::GSL::Rootsc::gsl_root_fsolver_set;
62 *gsl_root_fsolver_iterate = *Math::GSL::Rootsc::gsl_root_fsolver_iterate;
63 *gsl_root_fsolver_name = *Math::GSL::Rootsc::gsl_root_fsolver_name;
64 *gsl_root_fsolver_root = *Math::GSL::Rootsc::gsl_root_fsolver_root;
65 *gsl_root_fsolver_x_lower = *Math::GSL::Rootsc::gsl_root_fsolver_x_lower;
66 *gsl_root_fsolver_x_upper = *Math::GSL::Rootsc::gsl_root_fsolver_x_upper;
67 *gsl_root_fdfsolver_alloc = *Math::GSL::Rootsc::gsl_root_fdfsolver_alloc;
68 *gsl_root_fdfsolver_set = *Math::GSL::Rootsc::gsl_root_fdfsolver_set;
69 *gsl_root_fdfsolver_iterate = *Math::GSL::Rootsc::gsl_root_fdfsolver_iterate;
70 *gsl_root_fdfsolver_free = *Math::GSL::Rootsc::gsl_root_fdfsolver_free;
71 *gsl_root_fdfsolver_name = *Math::GSL::Rootsc::gsl_root_fdfsolver_name;
72 *gsl_root_fdfsolver_root = *Math::GSL::Rootsc::gsl_root_fdfsolver_root;
73 *gsl_root_test_interval = *Math::GSL::Rootsc::gsl_root_test_interval;
74 *gsl_root_test_residual = *Math::GSL::Rootsc::gsl_root_test_residual;
75 *gsl_root_test_delta = *Math::GSL::Rootsc::gsl_root_test_delta;
76  
77 ############# Class : Math::GSL::Roots::gsl_root_fsolver_type ##############
78  
79 package Math::GSL::Roots::gsl_root_fsolver_type;
80 use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
81 @ISA = qw( Math::GSL::Roots );
82 %OWNER = ();
83 %ITERATORS = ();
84 *swig_name_get = *Math::GSL::Rootsc::gsl_root_fsolver_type_name_get;
85 *swig_name_set = *Math::GSL::Rootsc::gsl_root_fsolver_type_name_set;
86 *swig_size_get = *Math::GSL::Rootsc::gsl_root_fsolver_type_size_get;
87 *swig_size_set = *Math::GSL::Rootsc::gsl_root_fsolver_type_size_set;
88 *swig_set_get = *Math::GSL::Rootsc::gsl_root_fsolver_type_set_get;
89 *swig_set_set = *Math::GSL::Rootsc::gsl_root_fsolver_type_set_set;
90 *swig_iterate_get = *Math::GSL::Rootsc::gsl_root_fsolver_type_iterate_get;
91 *swig_iterate_set = *Math::GSL::Rootsc::gsl_root_fsolver_type_iterate_set;
92 sub new {
93 my $pkg = shift;
94 my $self = Math::GSL::Rootsc::new_gsl_root_fsolver_type(@_);
95 bless $self, $pkg if defined($self);
96 }
97  
98 sub DESTROY {
99 return unless $_[0]->isa('HASH');
100 my $self = tied(%{$_[0]});
101 return unless defined $self;
102 delete $ITERATORS{$self};
103 if (exists $OWNER{$self}) {
104 Math::GSL::Rootsc::delete_gsl_root_fsolver_type($self);
105 delete $OWNER{$self};
106 }
107 }
108  
109 sub DISOWN {
110 my $self = shift;
111 my $ptr = tied(%$self);
112 delete $OWNER{$ptr};
113 }
114  
115 sub ACQUIRE {
116 my $self = shift;
117 my $ptr = tied(%$self);
118 $OWNER{$ptr} = 1;
119 }
120  
121  
122 ############# Class : Math::GSL::Roots::gsl_root_fsolver ##############
123  
124 package Math::GSL::Roots::gsl_root_fsolver;
125 use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
126 @ISA = qw( Math::GSL::Roots );
127 %OWNER = ();
128 %ITERATORS = ();
129 sub DESTROY {
130 return unless $_[0]->isa('HASH');
131 my $self = tied(%{$_[0]});
132 return unless defined $self;
133 delete $ITERATORS{$self};
134 if (exists $OWNER{$self}) {
135 Math::GSL::Rootsc::delete_gsl_root_fsolver($self);
136 delete $OWNER{$self};
137 }
138 }
139  
140 *swig_type_get = *Math::GSL::Rootsc::gsl_root_fsolver_type_get;
141 *swig_type_set = *Math::GSL::Rootsc::gsl_root_fsolver_type_set;
142 *swig_function_get = *Math::GSL::Rootsc::gsl_root_fsolver_function_get;
143 *swig_function_set = *Math::GSL::Rootsc::gsl_root_fsolver_function_set;
144 *swig_root_get = *Math::GSL::Rootsc::gsl_root_fsolver_root_get;
145 *swig_root_set = *Math::GSL::Rootsc::gsl_root_fsolver_root_set;
146 *swig_x_lower_get = *Math::GSL::Rootsc::gsl_root_fsolver_x_lower_get;
147 *swig_x_lower_set = *Math::GSL::Rootsc::gsl_root_fsolver_x_lower_set;
148 *swig_x_upper_get = *Math::GSL::Rootsc::gsl_root_fsolver_x_upper_get;
149 *swig_x_upper_set = *Math::GSL::Rootsc::gsl_root_fsolver_x_upper_set;
150 *swig_state_get = *Math::GSL::Rootsc::gsl_root_fsolver_state_get;
151 *swig_state_set = *Math::GSL::Rootsc::gsl_root_fsolver_state_set;
152 sub new {
153 my $pkg = shift;
154 my $self = Math::GSL::Rootsc::new_gsl_root_fsolver(@_);
155 bless $self, $pkg if defined($self);
156 }
157  
158 sub DISOWN {
159 my $self = shift;
160 my $ptr = tied(%$self);
161 delete $OWNER{$ptr};
162 }
163  
164 sub ACQUIRE {
165 my $self = shift;
166 my $ptr = tied(%$self);
167 $OWNER{$ptr} = 1;
168 }
169  
170  
171 ############# Class : Math::GSL::Roots::gsl_root_fdfsolver_type ##############
172  
173 package Math::GSL::Roots::gsl_root_fdfsolver_type;
174 use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
175 @ISA = qw( Math::GSL::Roots );
176 %OWNER = ();
177 %ITERATORS = ();
178 *swig_name_get = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_name_get;
179 *swig_name_set = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_name_set;
180 *swig_size_get = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_size_get;
181 *swig_size_set = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_size_set;
182 *swig_set_get = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_set_get;
183 *swig_set_set = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_set_set;
184 *swig_iterate_get = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_iterate_get;
185 *swig_iterate_set = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_iterate_set;
186 sub new {
187 my $pkg = shift;
188 my $self = Math::GSL::Rootsc::new_gsl_root_fdfsolver_type(@_);
189 bless $self, $pkg if defined($self);
190 }
191  
192 sub DESTROY {
193 return unless $_[0]->isa('HASH');
194 my $self = tied(%{$_[0]});
195 return unless defined $self;
196 delete $ITERATORS{$self};
197 if (exists $OWNER{$self}) {
198 Math::GSL::Rootsc::delete_gsl_root_fdfsolver_type($self);
199 delete $OWNER{$self};
200 }
201 }
202  
203 sub DISOWN {
204 my $self = shift;
205 my $ptr = tied(%$self);
206 delete $OWNER{$ptr};
207 }
208  
209 sub ACQUIRE {
210 my $self = shift;
211 my $ptr = tied(%$self);
212 $OWNER{$ptr} = 1;
213 }
214  
215  
216 ############# Class : Math::GSL::Roots::gsl_root_fdfsolver ##############
217  
218 package Math::GSL::Roots::gsl_root_fdfsolver;
219 use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
220 @ISA = qw( Math::GSL::Roots );
221 %OWNER = ();
222 %ITERATORS = ();
223 sub DESTROY {
224 return unless $_[0]->isa('HASH');
225 my $self = tied(%{$_[0]});
226 return unless defined $self;
227 delete $ITERATORS{$self};
228 if (exists $OWNER{$self}) {
229 Math::GSL::Rootsc::delete_gsl_root_fdfsolver($self);
230 delete $OWNER{$self};
231 }
232 }
233  
234 *swig_type_get = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_get;
235 *swig_type_set = *Math::GSL::Rootsc::gsl_root_fdfsolver_type_set;
236 *swig_fdf_get = *Math::GSL::Rootsc::gsl_root_fdfsolver_fdf_get;
237 *swig_fdf_set = *Math::GSL::Rootsc::gsl_root_fdfsolver_fdf_set;
238 *swig_root_get = *Math::GSL::Rootsc::gsl_root_fdfsolver_root_get;
239 *swig_root_set = *Math::GSL::Rootsc::gsl_root_fdfsolver_root_set;
240 *swig_state_get = *Math::GSL::Rootsc::gsl_root_fdfsolver_state_get;
241 *swig_state_set = *Math::GSL::Rootsc::gsl_root_fdfsolver_state_set;
242 sub new {
243 my $pkg = shift;
244 my $self = Math::GSL::Rootsc::new_gsl_root_fdfsolver(@_);
245 bless $self, $pkg if defined($self);
246 }
247  
248 sub DISOWN {
249 my $self = shift;
250 my $ptr = tied(%$self);
251 delete $OWNER{$ptr};
252 }
253  
254 sub ACQUIRE {
255 my $self = shift;
256 my $ptr = tied(%$self);
257 $OWNER{$ptr} = 1;
258 }
259  
260  
261 # ------- VARIABLE STUBS --------
262  
263 package Math::GSL::Roots;
264  
265 *GSL_VERSION = *Math::GSL::Rootsc::GSL_VERSION;
266 *GSL_MAJOR_VERSION = *Math::GSL::Rootsc::GSL_MAJOR_VERSION;
267 *GSL_MINOR_VERSION = *Math::GSL::Rootsc::GSL_MINOR_VERSION;
268 *GSL_POSZERO = *Math::GSL::Rootsc::GSL_POSZERO;
269 *GSL_NEGZERO = *Math::GSL::Rootsc::GSL_NEGZERO;
270 *GSL_SUCCESS = *Math::GSL::Rootsc::GSL_SUCCESS;
271 *GSL_FAILURE = *Math::GSL::Rootsc::GSL_FAILURE;
272 *GSL_CONTINUE = *Math::GSL::Rootsc::GSL_CONTINUE;
273 *GSL_EDOM = *Math::GSL::Rootsc::GSL_EDOM;
274 *GSL_ERANGE = *Math::GSL::Rootsc::GSL_ERANGE;
275 *GSL_EFAULT = *Math::GSL::Rootsc::GSL_EFAULT;
276 *GSL_EINVAL = *Math::GSL::Rootsc::GSL_EINVAL;
277 *GSL_EFAILED = *Math::GSL::Rootsc::GSL_EFAILED;
278 *GSL_EFACTOR = *Math::GSL::Rootsc::GSL_EFACTOR;
279 *GSL_ESANITY = *Math::GSL::Rootsc::GSL_ESANITY;
280 *GSL_ENOMEM = *Math::GSL::Rootsc::GSL_ENOMEM;
281 *GSL_EBADFUNC = *Math::GSL::Rootsc::GSL_EBADFUNC;
282 *GSL_ERUNAWAY = *Math::GSL::Rootsc::GSL_ERUNAWAY;
283 *GSL_EMAXITER = *Math::GSL::Rootsc::GSL_EMAXITER;
284 *GSL_EZERODIV = *Math::GSL::Rootsc::GSL_EZERODIV;
285 *GSL_EBADTOL = *Math::GSL::Rootsc::GSL_EBADTOL;
286 *GSL_ETOL = *Math::GSL::Rootsc::GSL_ETOL;
287 *GSL_EUNDRFLW = *Math::GSL::Rootsc::GSL_EUNDRFLW;
288 *GSL_EOVRFLW = *Math::GSL::Rootsc::GSL_EOVRFLW;
289 *GSL_ELOSS = *Math::GSL::Rootsc::GSL_ELOSS;
290 *GSL_EROUND = *Math::GSL::Rootsc::GSL_EROUND;
291 *GSL_EBADLEN = *Math::GSL::Rootsc::GSL_EBADLEN;
292 *GSL_ENOTSQR = *Math::GSL::Rootsc::GSL_ENOTSQR;
293 *GSL_ESING = *Math::GSL::Rootsc::GSL_ESING;
294 *GSL_EDIVERGE = *Math::GSL::Rootsc::GSL_EDIVERGE;
295 *GSL_EUNSUP = *Math::GSL::Rootsc::GSL_EUNSUP;
296 *GSL_EUNIMPL = *Math::GSL::Rootsc::GSL_EUNIMPL;
297 *GSL_ECACHE = *Math::GSL::Rootsc::GSL_ECACHE;
298 *GSL_ETABLE = *Math::GSL::Rootsc::GSL_ETABLE;
299 *GSL_ENOPROG = *Math::GSL::Rootsc::GSL_ENOPROG;
300 *GSL_ENOPROGJ = *Math::GSL::Rootsc::GSL_ENOPROGJ;
301 *GSL_ETOLF = *Math::GSL::Rootsc::GSL_ETOLF;
302 *GSL_ETOLX = *Math::GSL::Rootsc::GSL_ETOLX;
303 *GSL_ETOLG = *Math::GSL::Rootsc::GSL_ETOLG;
304 *GSL_EOF = *Math::GSL::Rootsc::GSL_EOF;
305  
306 my %__gsl_root_fsolver_bisection_hash;
307 tie %__gsl_root_fsolver_bisection_hash,"Math::GSL::Roots::gsl_root_fsolver_type", $Math::GSL::Rootsc::gsl_root_fsolver_bisection;
308 $gsl_root_fsolver_bisection= \%__gsl_root_fsolver_bisection_hash;
309 bless $gsl_root_fsolver_bisection, Math::GSL::Roots::gsl_root_fsolver_type;
310  
311 my %__gsl_root_fsolver_brent_hash;
312 tie %__gsl_root_fsolver_brent_hash,"Math::GSL::Roots::gsl_root_fsolver_type", $Math::GSL::Rootsc::gsl_root_fsolver_brent;
313 $gsl_root_fsolver_brent= \%__gsl_root_fsolver_brent_hash;
314 bless $gsl_root_fsolver_brent, Math::GSL::Roots::gsl_root_fsolver_type;
315  
316 my %__gsl_root_fsolver_falsepos_hash;
317 tie %__gsl_root_fsolver_falsepos_hash,"Math::GSL::Roots::gsl_root_fsolver_type", $Math::GSL::Rootsc::gsl_root_fsolver_falsepos;
318 $gsl_root_fsolver_falsepos= \%__gsl_root_fsolver_falsepos_hash;
319 bless $gsl_root_fsolver_falsepos, Math::GSL::Roots::gsl_root_fsolver_type;
320  
321 my %__gsl_root_fdfsolver_newton_hash;
322 tie %__gsl_root_fdfsolver_newton_hash,"Math::GSL::Roots::gsl_root_fdfsolver_type", $Math::GSL::Rootsc::gsl_root_fdfsolver_newton;
323 $gsl_root_fdfsolver_newton= \%__gsl_root_fdfsolver_newton_hash;
324 bless $gsl_root_fdfsolver_newton, Math::GSL::Roots::gsl_root_fdfsolver_type;
325  
326 my %__gsl_root_fdfsolver_secant_hash;
327 tie %__gsl_root_fdfsolver_secant_hash,"Math::GSL::Roots::gsl_root_fdfsolver_type", $Math::GSL::Rootsc::gsl_root_fdfsolver_secant;
328 $gsl_root_fdfsolver_secant= \%__gsl_root_fdfsolver_secant_hash;
329 bless $gsl_root_fdfsolver_secant, Math::GSL::Roots::gsl_root_fdfsolver_type;
330  
331 my %__gsl_root_fdfsolver_steffenson_hash;
332 tie %__gsl_root_fdfsolver_steffenson_hash,"Math::GSL::Roots::gsl_root_fdfsolver_type", $Math::GSL::Rootsc::gsl_root_fdfsolver_steffenson;
333 $gsl_root_fdfsolver_steffenson= \%__gsl_root_fdfsolver_steffenson_hash;
334 bless $gsl_root_fdfsolver_steffenson, Math::GSL::Roots::gsl_root_fdfsolver_type;
335 @EXPORT_OK = qw/
336 gsl_root_fsolver_alloc
337 gsl_root_fsolver_free
338 gsl_root_fsolver_set
339 gsl_root_fsolver_iterate
340 gsl_root_fsolver_name
341 gsl_root_fsolver_root
342 gsl_root_fsolver_x_lower
343 gsl_root_fsolver_x_upper
344 gsl_root_fdfsolver_alloc
345 gsl_root_fdfsolver_set
346 gsl_root_fdfsolver_iterate
347 gsl_root_fdfsolver_free
348 gsl_root_fdfsolver_name
349 gsl_root_fdfsolver_root
350 gsl_root_test_interval
351 gsl_root_test_residual
352 gsl_root_test_delta
353 $gsl_root_fsolver_bisection
354 $gsl_root_fsolver_brent
355 $gsl_root_fsolver_falsepos
356 $gsl_root_fdfsolver_newton
357 $gsl_root_fdfsolver_secant
358 $gsl_root_fdfsolver_steffenson
359 /;
360 %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );
361  
362 __END__