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

filter: Statementstmt 0.0% 0 / 151 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 14 Podpod 0.0% 0 / 11 totaltotal 0.0% 0 / 184 CC 5 SCAR 18.6
CC
5
Cov
0%
DESTROY
20.0
new
6.0
TIEHASH
2.0
CRAP 6.4
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::Sort;
8 use base qw(Exporter);
9 use base qw(DynaLoader);
10 package Math::GSL::Sortc;
11 bootstrap Math::GSL::Sort;
12 package Math::GSL::Sort;
13 @EXPORT = qw();
14  
15 # ---------- BASE METHODS -------------
16  
17 package Math::GSL::Sort;
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::Sort;
51  
52 *gsl_error = *Math::GSL::Sortc::gsl_error;
53 *gsl_stream_printf = *Math::GSL::Sortc::gsl_stream_printf;
54 *gsl_strerror = *Math::GSL::Sortc::gsl_strerror;
55 *gsl_set_error_handler = *Math::GSL::Sortc::gsl_set_error_handler;
56 *gsl_set_error_handler_off = *Math::GSL::Sortc::gsl_set_error_handler_off;
57 *gsl_set_stream_handler = *Math::GSL::Sortc::gsl_set_stream_handler;
58 *gsl_set_stream = *Math::GSL::Sortc::gsl_set_stream;
59 *gsl_sort = *Math::GSL::Sortc::gsl_sort;
60 *gsl_sort2 = *Math::GSL::Sortc::gsl_sort2;
61 *gsl_sort_index = *Math::GSL::Sortc::gsl_sort_index;
62 *gsl_sort_smallest = *Math::GSL::Sortc::gsl_sort_smallest;
63 *gsl_sort_smallest_index = *Math::GSL::Sortc::gsl_sort_smallest_index;
64 *gsl_sort_largest = *Math::GSL::Sortc::gsl_sort_largest;
65 *gsl_sort_largest_index = *Math::GSL::Sortc::gsl_sort_largest_index;
66 *gsl_sort_int = *Math::GSL::Sortc::gsl_sort_int;
67 *gsl_sort2_int = *Math::GSL::Sortc::gsl_sort2_int;
68 *gsl_sort_int_index = *Math::GSL::Sortc::gsl_sort_int_index;
69 *gsl_sort_int_smallest = *Math::GSL::Sortc::gsl_sort_int_smallest;
70 *gsl_sort_int_smallest_index = *Math::GSL::Sortc::gsl_sort_int_smallest_index;
71 *gsl_sort_int_largest = *Math::GSL::Sortc::gsl_sort_int_largest;
72 *gsl_sort_int_largest_index = *Math::GSL::Sortc::gsl_sort_int_largest_index;
73 *gsl_sort_vector = *Math::GSL::Sortc::gsl_sort_vector;
74 *gsl_sort_vector2 = *Math::GSL::Sortc::gsl_sort_vector2;
75 *gsl_sort_vector_index = *Math::GSL::Sortc::gsl_sort_vector_index;
76 *gsl_sort_vector_smallest = *Math::GSL::Sortc::gsl_sort_vector_smallest;
77 *gsl_sort_vector_largest = *Math::GSL::Sortc::gsl_sort_vector_largest;
78 *gsl_sort_vector_smallest_index = *Math::GSL::Sortc::gsl_sort_vector_smallest_index;
79 *gsl_sort_vector_largest_index = *Math::GSL::Sortc::gsl_sort_vector_largest_index;
80 *gsl_sort_vector_int = *Math::GSL::Sortc::gsl_sort_vector_int;
81 *gsl_sort_vector2_int = *Math::GSL::Sortc::gsl_sort_vector2_int;
82 *gsl_sort_vector_int_index = *Math::GSL::Sortc::gsl_sort_vector_int_index;
83 *gsl_sort_vector_int_smallest = *Math::GSL::Sortc::gsl_sort_vector_int_smallest;
84 *gsl_sort_vector_int_largest = *Math::GSL::Sortc::gsl_sort_vector_int_largest;
85 *gsl_sort_vector_int_smallest_index = *Math::GSL::Sortc::gsl_sort_vector_int_smallest_index;
86 *gsl_sort_vector_int_largest_index = *Math::GSL::Sortc::gsl_sort_vector_int_largest_index;
87 *gsl_permutation_alloc = *Math::GSL::Sortc::gsl_permutation_alloc;
88 *gsl_permutation_calloc = *Math::GSL::Sortc::gsl_permutation_calloc;
89 *gsl_permutation_init = *Math::GSL::Sortc::gsl_permutation_init;
90 *gsl_permutation_free = *Math::GSL::Sortc::gsl_permutation_free;
91 *gsl_permutation_memcpy = *Math::GSL::Sortc::gsl_permutation_memcpy;
92 *gsl_permutation_fread = *Math::GSL::Sortc::gsl_permutation_fread;
93 *gsl_permutation_fwrite = *Math::GSL::Sortc::gsl_permutation_fwrite;
94 *gsl_permutation_fscanf = *Math::GSL::Sortc::gsl_permutation_fscanf;
95 *gsl_permutation_fprintf = *Math::GSL::Sortc::gsl_permutation_fprintf;
96 *gsl_permutation_size = *Math::GSL::Sortc::gsl_permutation_size;
97 *gsl_permutation_data = *Math::GSL::Sortc::gsl_permutation_data;
98 *gsl_permutation_swap = *Math::GSL::Sortc::gsl_permutation_swap;
99 *gsl_permutation_valid = *Math::GSL::Sortc::gsl_permutation_valid;
100 *gsl_permutation_reverse = *Math::GSL::Sortc::gsl_permutation_reverse;
101 *gsl_permutation_inverse = *Math::GSL::Sortc::gsl_permutation_inverse;
102 *gsl_permutation_next = *Math::GSL::Sortc::gsl_permutation_next;
103 *gsl_permutation_prev = *Math::GSL::Sortc::gsl_permutation_prev;
104 *gsl_permutation_mul = *Math::GSL::Sortc::gsl_permutation_mul;
105 *gsl_permutation_linear_to_canonical = *Math::GSL::Sortc::gsl_permutation_linear_to_canonical;
106 *gsl_permutation_canonical_to_linear = *Math::GSL::Sortc::gsl_permutation_canonical_to_linear;
107 *gsl_permutation_inversions = *Math::GSL::Sortc::gsl_permutation_inversions;
108 *gsl_permutation_linear_cycles = *Math::GSL::Sortc::gsl_permutation_linear_cycles;
109 *gsl_permutation_canonical_cycles = *Math::GSL::Sortc::gsl_permutation_canonical_cycles;
110 *gsl_permutation_get = *Math::GSL::Sortc::gsl_permutation_get;
111  
112 ############# Class : Math::GSL::Sort::gsl_permutation_struct ##############
113  
114 package Math::GSL::Sort::gsl_permutation_struct;
115 use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
116 @ISA = qw( Math::GSL::Sort );
117 %OWNER = ();
118 %ITERATORS = ();
119 *swig_size_get = *Math::GSL::Sortc::gsl_permutation_struct_size_get;
120 *swig_size_set = *Math::GSL::Sortc::gsl_permutation_struct_size_set;
121 *swig_data_get = *Math::GSL::Sortc::gsl_permutation_struct_data_get;
122 *swig_data_set = *Math::GSL::Sortc::gsl_permutation_struct_data_set;
123 sub new {
124 my $pkg = shift;
125 my $self = Math::GSL::Sortc::new_gsl_permutation_struct(@_);
126 bless $self, $pkg if defined($self);
127 }
128  
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::Sortc::delete_gsl_permutation_struct($self);
136 delete $OWNER{$self};
137 }
138 }
139  
140 sub DISOWN {
141 my $self = shift;
142 my $ptr = tied(%$self);
143 delete $OWNER{$ptr};
144 }
145  
146 sub ACQUIRE {
147 my $self = shift;
148 my $ptr = tied(%$self);
149 $OWNER{$ptr} = 1;
150 }
151  
152  
153 # ------- VARIABLE STUBS --------
154  
155 package Math::GSL::Sort;
156  
157 *GSL_VERSION = *Math::GSL::Sortc::GSL_VERSION;
158 *GSL_MAJOR_VERSION = *Math::GSL::Sortc::GSL_MAJOR_VERSION;
159 *GSL_MINOR_VERSION = *Math::GSL::Sortc::GSL_MINOR_VERSION;
160 *GSL_POSZERO = *Math::GSL::Sortc::GSL_POSZERO;
161 *GSL_NEGZERO = *Math::GSL::Sortc::GSL_NEGZERO;
162 *GSL_SUCCESS = *Math::GSL::Sortc::GSL_SUCCESS;
163 *GSL_FAILURE = *Math::GSL::Sortc::GSL_FAILURE;
164 *GSL_CONTINUE = *Math::GSL::Sortc::GSL_CONTINUE;
165 *GSL_EDOM = *Math::GSL::Sortc::GSL_EDOM;
166 *GSL_ERANGE = *Math::GSL::Sortc::GSL_ERANGE;
167 *GSL_EFAULT = *Math::GSL::Sortc::GSL_EFAULT;
168 *GSL_EINVAL = *Math::GSL::Sortc::GSL_EINVAL;
169 *GSL_EFAILED = *Math::GSL::Sortc::GSL_EFAILED;
170 *GSL_EFACTOR = *Math::GSL::Sortc::GSL_EFACTOR;
171 *GSL_ESANITY = *Math::GSL::Sortc::GSL_ESANITY;
172 *GSL_ENOMEM = *Math::GSL::Sortc::GSL_ENOMEM;
173 *GSL_EBADFUNC = *Math::GSL::Sortc::GSL_EBADFUNC;
174 *GSL_ERUNAWAY = *Math::GSL::Sortc::GSL_ERUNAWAY;
175 *GSL_EMAXITER = *Math::GSL::Sortc::GSL_EMAXITER;
176 *GSL_EZERODIV = *Math::GSL::Sortc::GSL_EZERODIV;
177 *GSL_EBADTOL = *Math::GSL::Sortc::GSL_EBADTOL;
178 *GSL_ETOL = *Math::GSL::Sortc::GSL_ETOL;
179 *GSL_EUNDRFLW = *Math::GSL::Sortc::GSL_EUNDRFLW;
180 *GSL_EOVRFLW = *Math::GSL::Sortc::GSL_EOVRFLW;
181 *GSL_ELOSS = *Math::GSL::Sortc::GSL_ELOSS;
182 *GSL_EROUND = *Math::GSL::Sortc::GSL_EROUND;
183 *GSL_EBADLEN = *Math::GSL::Sortc::GSL_EBADLEN;
184 *GSL_ENOTSQR = *Math::GSL::Sortc::GSL_ENOTSQR;
185 *GSL_ESING = *Math::GSL::Sortc::GSL_ESING;
186 *GSL_EDIVERGE = *Math::GSL::Sortc::GSL_EDIVERGE;
187 *GSL_EUNSUP = *Math::GSL::Sortc::GSL_EUNSUP;
188 *GSL_EUNIMPL = *Math::GSL::Sortc::GSL_EUNIMPL;
189 *GSL_ECACHE = *Math::GSL::Sortc::GSL_ECACHE;
190 *GSL_ETABLE = *Math::GSL::Sortc::GSL_ETABLE;
191 *GSL_ENOPROG = *Math::GSL::Sortc::GSL_ENOPROG;
192 *GSL_ENOPROGJ = *Math::GSL::Sortc::GSL_ENOPROGJ;
193 *GSL_ETOLF = *Math::GSL::Sortc::GSL_ETOLF;
194 *GSL_ETOLX = *Math::GSL::Sortc::GSL_ETOLX;
195 *GSL_ETOLG = *Math::GSL::Sortc::GSL_ETOLG;
196 *GSL_EOF = *Math::GSL::Sortc::GSL_EOF;
197  
198 @EXPORT_plain = qw/
199 gsl_sort gsl_sort_index
200 gsl_sort_smallest gsl_sort_smallest_index
201 gsl_sort_largest gsl_sort_largest_index
202 /;
203 @EXPORT_vector= qw/
204 gsl_sort_vector gsl_sort_vector_index
205 gsl_sort_vector_smallest gsl_sort_vector_smallest_index
206 gsl_sort_vector_largest gsl_sort_vector_largest_index
207 /;
208 @EXPORT_OK = ( @EXPORT_plain, @EXPORT_vector );
209 %EXPORT_TAGS = (
210 all => [ @EXPORT_OK ],
211 plain => [ @EXPORT_plain ],
212 vector => [ @EXPORT_vector ],
213 );
214 __END__