| 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::NTuple; | ||||||||||
| 8 | 1 | ▶ | use base qw(Exporter); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use base qw(DynaLoader); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | package Math::GSL::NTuplec; | ||||||||||
| 11 | bootstrap Math::GSL::NTuple; | ||||||||||
| 12 | package Math::GSL::NTuple; | ||||||||||
| 13 | @EXPORT = qw(); | ||||||||||
| 14 | |||||||||||
| 15 | # ---------- BASE METHODS ------------- | ||||||||||
| 16 | |||||||||||
| 17 | package Math::GSL::NTuple; | ||||||||||
| 18 | |||||||||||
| 19 | 0 | ▶ | sub TIEHASH { | ||||||||
|
Subroutine
TIEHASH: not called CC=1 SCAR=6.9
| |||||||||||
| 20 | 0 | my ($classname,$obj) = @_; | |||||||||
| 21 | 0 | return bless $obj, $classname; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | sub CLEAR { } | ||||||||
|
Subroutine
CLEAR: not called CC=1 SCAR=0.0
| |||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub FIRSTKEY { } | ||||||||
|
Subroutine
FIRSTKEY: not called CC=1 SCAR=0.0
| |||||||||||
| 27 | |||||||||||
| 28 | 0 | ▶ | sub NEXTKEY { } | ||||||||
|
Subroutine
NEXTKEY: not called CC=1 SCAR=0.0
| |||||||||||
| 29 | |||||||||||
| 30 | 0 | ▶ | sub FETCH { | ||||||||
|
Subroutine
FETCH: not called CC=1 SCAR=6.9
| |||||||||||
| 31 | 0 | my ($self,$field) = @_; | |||||||||
| 32 | 0 | my $member_func = "swig_${field}_get"; | |||||||||
| 33 | 0 | $self->$member_func(); | |||||||||
| 34 | } | ||||||||||
| 35 | |||||||||||
| 36 | 0 | ▶ | sub STORE { | ||||||||
|
Subroutine
STORE: not called CC=1 SCAR=6.9
| |||||||||||
| 37 | 0 | my ($self,$field,$newval) = @_; | |||||||||
| 38 | 0 | my $member_func = "swig_${field}_set"; | |||||||||
| 39 | 0 | $self->$member_func($newval); | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 0 | ▶ | sub this { | ||||||||
|
Subroutine
this: not called CC=1 SCAR=6.9
| |||||||||||
| 43 | 0 | my $ptr = shift; | |||||||||
| 44 | 0 | return tied(%$ptr); | |||||||||
| 45 | } | ||||||||||
| 46 | |||||||||||
| 47 | |||||||||||
| 48 | # ------- FUNCTION WRAPPERS -------- | ||||||||||
| 49 | |||||||||||
| 50 | package Math::GSL::NTuple; | ||||||||||
| 51 | |||||||||||
| 52 | *gsl_error = *Math::GSL::NTuplec::gsl_error; | ||||||||||
| 53 | *gsl_stream_printf = *Math::GSL::NTuplec::gsl_stream_printf; | ||||||||||
| 54 | *gsl_strerror = *Math::GSL::NTuplec::gsl_strerror; | ||||||||||
| 55 | *gsl_set_error_handler = *Math::GSL::NTuplec::gsl_set_error_handler; | ||||||||||
| 56 | *gsl_set_error_handler_off = *Math::GSL::NTuplec::gsl_set_error_handler_off; | ||||||||||
| 57 | *gsl_set_stream_handler = *Math::GSL::NTuplec::gsl_set_stream_handler; | ||||||||||
| 58 | *gsl_set_stream = *Math::GSL::NTuplec::gsl_set_stream; | ||||||||||
| 59 | *gsl_ntuple_open = *Math::GSL::NTuplec::gsl_ntuple_open; | ||||||||||
| 60 | *gsl_ntuple_create = *Math::GSL::NTuplec::gsl_ntuple_create; | ||||||||||
| 61 | *gsl_ntuple_write = *Math::GSL::NTuplec::gsl_ntuple_write; | ||||||||||
| 62 | *gsl_ntuple_read = *Math::GSL::NTuplec::gsl_ntuple_read; | ||||||||||
| 63 | *gsl_ntuple_bookdata = *Math::GSL::NTuplec::gsl_ntuple_bookdata; | ||||||||||
| 64 | *gsl_ntuple_project = *Math::GSL::NTuplec::gsl_ntuple_project; | ||||||||||
| 65 | *gsl_ntuple_close = *Math::GSL::NTuplec::gsl_ntuple_close; | ||||||||||
| 66 | *gsl_histogram_alloc = *Math::GSL::NTuplec::gsl_histogram_alloc; | ||||||||||
| 67 | *gsl_histogram_calloc = *Math::GSL::NTuplec::gsl_histogram_calloc; | ||||||||||
| 68 | *gsl_histogram_calloc_uniform = *Math::GSL::NTuplec::gsl_histogram_calloc_uniform; | ||||||||||
| 69 | *gsl_histogram_free = *Math::GSL::NTuplec::gsl_histogram_free; | ||||||||||
| 70 | *gsl_histogram_increment = *Math::GSL::NTuplec::gsl_histogram_increment; | ||||||||||
| 71 | *gsl_histogram_accumulate = *Math::GSL::NTuplec::gsl_histogram_accumulate; | ||||||||||
| 72 | *gsl_histogram_find = *Math::GSL::NTuplec::gsl_histogram_find; | ||||||||||
| 73 | *gsl_histogram_get = *Math::GSL::NTuplec::gsl_histogram_get; | ||||||||||
| 74 | *gsl_histogram_get_range = *Math::GSL::NTuplec::gsl_histogram_get_range; | ||||||||||
| 75 | *gsl_histogram_max = *Math::GSL::NTuplec::gsl_histogram_max; | ||||||||||
| 76 | *gsl_histogram_min = *Math::GSL::NTuplec::gsl_histogram_min; | ||||||||||
| 77 | *gsl_histogram_bins = *Math::GSL::NTuplec::gsl_histogram_bins; | ||||||||||
| 78 | *gsl_histogram_reset = *Math::GSL::NTuplec::gsl_histogram_reset; | ||||||||||
| 79 | *gsl_histogram_calloc_range = *Math::GSL::NTuplec::gsl_histogram_calloc_range; | ||||||||||
| 80 | *gsl_histogram_set_ranges = *Math::GSL::NTuplec::gsl_histogram_set_ranges; | ||||||||||
| 81 | *gsl_histogram_set_ranges_uniform = *Math::GSL::NTuplec::gsl_histogram_set_ranges_uniform; | ||||||||||
| 82 | *gsl_histogram_memcpy = *Math::GSL::NTuplec::gsl_histogram_memcpy; | ||||||||||
| 83 | *gsl_histogram_clone = *Math::GSL::NTuplec::gsl_histogram_clone; | ||||||||||
| 84 | *gsl_histogram_max_val = *Math::GSL::NTuplec::gsl_histogram_max_val; | ||||||||||
| 85 | *gsl_histogram_max_bin = *Math::GSL::NTuplec::gsl_histogram_max_bin; | ||||||||||
| 86 | *gsl_histogram_min_val = *Math::GSL::NTuplec::gsl_histogram_min_val; | ||||||||||
| 87 | *gsl_histogram_min_bin = *Math::GSL::NTuplec::gsl_histogram_min_bin; | ||||||||||
| 88 | *gsl_histogram_equal_bins_p = *Math::GSL::NTuplec::gsl_histogram_equal_bins_p; | ||||||||||
| 89 | *gsl_histogram_add = *Math::GSL::NTuplec::gsl_histogram_add; | ||||||||||
| 90 | *gsl_histogram_sub = *Math::GSL::NTuplec::gsl_histogram_sub; | ||||||||||
| 91 | *gsl_histogram_mul = *Math::GSL::NTuplec::gsl_histogram_mul; | ||||||||||
| 92 | *gsl_histogram_div = *Math::GSL::NTuplec::gsl_histogram_div; | ||||||||||
| 93 | *gsl_histogram_scale = *Math::GSL::NTuplec::gsl_histogram_scale; | ||||||||||
| 94 | *gsl_histogram_shift = *Math::GSL::NTuplec::gsl_histogram_shift; | ||||||||||
| 95 | *gsl_histogram_sigma = *Math::GSL::NTuplec::gsl_histogram_sigma; | ||||||||||
| 96 | *gsl_histogram_mean = *Math::GSL::NTuplec::gsl_histogram_mean; | ||||||||||
| 97 | *gsl_histogram_sum = *Math::GSL::NTuplec::gsl_histogram_sum; | ||||||||||
| 98 | *gsl_histogram_fwrite = *Math::GSL::NTuplec::gsl_histogram_fwrite; | ||||||||||
| 99 | *gsl_histogram_fread = *Math::GSL::NTuplec::gsl_histogram_fread; | ||||||||||
| 100 | *gsl_histogram_fprintf = *Math::GSL::NTuplec::gsl_histogram_fprintf; | ||||||||||
| 101 | *gsl_histogram_fscanf = *Math::GSL::NTuplec::gsl_histogram_fscanf; | ||||||||||
| 102 | *gsl_histogram_pdf_alloc = *Math::GSL::NTuplec::gsl_histogram_pdf_alloc; | ||||||||||
| 103 | *gsl_histogram_pdf_init = *Math::GSL::NTuplec::gsl_histogram_pdf_init; | ||||||||||
| 104 | *gsl_histogram_pdf_free = *Math::GSL::NTuplec::gsl_histogram_pdf_free; | ||||||||||
| 105 | *gsl_histogram_pdf_sample = *Math::GSL::NTuplec::gsl_histogram_pdf_sample; | ||||||||||
| 106 | |||||||||||
| 107 | ############# Class : Math::GSL::NTuple::gsl_ntuple ############## | ||||||||||
| 108 | |||||||||||
| 109 | package Math::GSL::NTuple::gsl_ntuple; | ||||||||||
| 110 | 1 | ▶ | use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 111 | @ISA = qw( Math::GSL::NTuple ); | ||||||||||
| 112 | %OWNER = (); | ||||||||||
| 113 | %ITERATORS = (); | ||||||||||
| 114 | *swig_file_get = *Math::GSL::NTuplec::gsl_ntuple_file_get; | ||||||||||
| 115 | *swig_file_set = *Math::GSL::NTuplec::gsl_ntuple_file_set; | ||||||||||
| 116 | *swig_ntuple_data_get = *Math::GSL::NTuplec::gsl_ntuple_ntuple_data_get; | ||||||||||
| 117 | *swig_ntuple_data_set = *Math::GSL::NTuplec::gsl_ntuple_ntuple_data_set; | ||||||||||
| 118 | *swig_size_get = *Math::GSL::NTuplec::gsl_ntuple_size_get; | ||||||||||
| 119 | *swig_size_set = *Math::GSL::NTuplec::gsl_ntuple_size_set; | ||||||||||
| 120 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
| |||||||||||
| 121 | 0 | my $pkg = shift; | |||||||||
| 122 | 0 | my $self = Math::GSL::NTuplec::new_gsl_ntuple(@_); | |||||||||
| 123 | 0 | ▶ | bless $self, $pkg if defined($self); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 124 | } | ||||||||||
| 125 | |||||||||||
| 126 | 0 | ▶ | sub DESTROY { | ||||||||
|
Subroutine
DESTROY: not called CC=4 SCAR=30.0
| |||||||||||
| 127 | 0 | ▶ | return unless $_[0]->isa('HASH'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 128 | 0 | my $self = tied(%{$_[0]}); | |||||||||
| 129 | 0 | ▶ | return unless defined $self; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 130 | 0 | delete $ITERATORS{$self}; | |||||||||
| 131 | 0 | ▶ | if (exists $OWNER{$self}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 132 | 0 | Math::GSL::NTuplec::delete_gsl_ntuple($self); | |||||||||
| 133 | 0 | delete $OWNER{$self}; | |||||||||
| 134 | } | ||||||||||
| 135 | } | ||||||||||
| 136 | |||||||||||
| 137 | 0 | ▶ | sub DISOWN { | ||||||||
|
Subroutine
DISOWN: not called CC=1 SCAR=6.9
| |||||||||||
| 138 | 0 | my $self = shift; | |||||||||
| 139 | 0 | my $ptr = tied(%$self); | |||||||||
| 140 | 0 | delete $OWNER{$ptr}; | |||||||||
| 141 | } | ||||||||||
| 142 | |||||||||||
| 143 | 0 | ▶ | sub ACQUIRE { | ||||||||
|
Subroutine
ACQUIRE: not called CC=1 SCAR=6.9
| |||||||||||
| 144 | 0 | my $self = shift; | |||||||||
| 145 | 0 | my $ptr = tied(%$self); | |||||||||
| 146 | 0 | $OWNER{$ptr} = 1; | |||||||||
| 147 | } | ||||||||||
| 148 | |||||||||||
| 149 | |||||||||||
| 150 | ############# Class : Math::GSL::NTuple::gsl_ntuple_select_fn ############## | ||||||||||
| 151 | |||||||||||
| 152 | package Math::GSL::NTuple::gsl_ntuple_select_fn; | ||||||||||
| 153 | 1 | ▶ | use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 154 | @ISA = qw( Math::GSL::NTuple ); | ||||||||||
| 155 | %OWNER = (); | ||||||||||
| 156 | %ITERATORS = (); | ||||||||||
| 157 | *swig_function_get = *Math::GSL::NTuplec::gsl_ntuple_select_fn_function_get; | ||||||||||
| 158 | *swig_function_set = *Math::GSL::NTuplec::gsl_ntuple_select_fn_function_set; | ||||||||||
| 159 | *swig_params_get = *Math::GSL::NTuplec::gsl_ntuple_select_fn_params_get; | ||||||||||
| 160 | *swig_params_set = *Math::GSL::NTuplec::gsl_ntuple_select_fn_params_set; | ||||||||||
| 161 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
| |||||||||||
| 162 | 0 | my $pkg = shift; | |||||||||
| 163 | 0 | my $self = Math::GSL::NTuplec::new_gsl_ntuple_select_fn(@_); | |||||||||
| 164 | 0 | ▶ | bless $self, $pkg if defined($self); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 165 | } | ||||||||||
| 166 | |||||||||||
| 167 | 0 | ▶ | sub DESTROY { | ||||||||
|
Subroutine
DESTROY: not called CC=4 SCAR=30.0
| |||||||||||
| 168 | 0 | ▶ | return unless $_[0]->isa('HASH'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 169 | 0 | my $self = tied(%{$_[0]}); | |||||||||
| 170 | 0 | ▶ | return unless defined $self; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 171 | 0 | delete $ITERATORS{$self}; | |||||||||
| 172 | 0 | ▶ | if (exists $OWNER{$self}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 173 | 0 | Math::GSL::NTuplec::delete_gsl_ntuple_select_fn($self); | |||||||||
| 174 | 0 | delete $OWNER{$self}; | |||||||||
| 175 | } | ||||||||||
| 176 | } | ||||||||||
| 177 | |||||||||||
| 178 | 0 | ▶ | sub DISOWN { | ||||||||
|
Subroutine
DISOWN: not called CC=1 SCAR=6.9
| |||||||||||
| 179 | 0 | my $self = shift; | |||||||||
| 180 | 0 | my $ptr = tied(%$self); | |||||||||
| 181 | 0 | delete $OWNER{$ptr}; | |||||||||
| 182 | } | ||||||||||
| 183 | |||||||||||
| 184 | 0 | ▶ | sub ACQUIRE { | ||||||||
|
Subroutine
ACQUIRE: not called CC=1 SCAR=6.9
| |||||||||||
| 185 | 0 | my $self = shift; | |||||||||
| 186 | 0 | my $ptr = tied(%$self); | |||||||||
| 187 | 0 | $OWNER{$ptr} = 1; | |||||||||
| 188 | } | ||||||||||
| 189 | |||||||||||
| 190 | |||||||||||
| 191 | ############# Class : Math::GSL::NTuple::gsl_ntuple_value_fn ############## | ||||||||||
| 192 | |||||||||||
| 193 | package Math::GSL::NTuple::gsl_ntuple_value_fn; | ||||||||||
| 194 | 1 | ▶ | use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 195 | @ISA = qw( Math::GSL::NTuple ); | ||||||||||
| 196 | %OWNER = (); | ||||||||||
| 197 | %ITERATORS = (); | ||||||||||
| 198 | *swig_function_get = *Math::GSL::NTuplec::gsl_ntuple_value_fn_function_get; | ||||||||||
| 199 | *swig_function_set = *Math::GSL::NTuplec::gsl_ntuple_value_fn_function_set; | ||||||||||
| 200 | *swig_params_get = *Math::GSL::NTuplec::gsl_ntuple_value_fn_params_get; | ||||||||||
| 201 | *swig_params_set = *Math::GSL::NTuplec::gsl_ntuple_value_fn_params_set; | ||||||||||
| 202 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
| |||||||||||
| 203 | 0 | my $pkg = shift; | |||||||||
| 204 | 0 | my $self = Math::GSL::NTuplec::new_gsl_ntuple_value_fn(@_); | |||||||||
| 205 | 0 | ▶ | bless $self, $pkg if defined($self); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 206 | } | ||||||||||
| 207 | |||||||||||
| 208 | 0 | ▶ | sub DESTROY { | ||||||||
|
Subroutine
DESTROY: not called CC=4 SCAR=30.0
| |||||||||||
| 209 | 0 | ▶ | return unless $_[0]->isa('HASH'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 210 | 0 | my $self = tied(%{$_[0]}); | |||||||||
| 211 | 0 | ▶ | return unless defined $self; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 212 | 0 | delete $ITERATORS{$self}; | |||||||||
| 213 | 0 | ▶ | if (exists $OWNER{$self}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 214 | 0 | Math::GSL::NTuplec::delete_gsl_ntuple_value_fn($self); | |||||||||
| 215 | 0 | delete $OWNER{$self}; | |||||||||
| 216 | } | ||||||||||
| 217 | } | ||||||||||
| 218 | |||||||||||
| 219 | 0 | ▶ | sub DISOWN { | ||||||||
|
Subroutine
DISOWN: not called CC=1 SCAR=6.9
| |||||||||||
| 220 | 0 | my $self = shift; | |||||||||
| 221 | 0 | my $ptr = tied(%$self); | |||||||||
| 222 | 0 | delete $OWNER{$ptr}; | |||||||||
| 223 | } | ||||||||||
| 224 | |||||||||||
| 225 | 0 | ▶ | sub ACQUIRE { | ||||||||
|
Subroutine
ACQUIRE: not called CC=1 SCAR=6.9
| |||||||||||
| 226 | 0 | my $self = shift; | |||||||||
| 227 | 0 | my $ptr = tied(%$self); | |||||||||
| 228 | 0 | $OWNER{$ptr} = 1; | |||||||||
| 229 | } | ||||||||||
| 230 | |||||||||||
| 231 | |||||||||||
| 232 | ############# Class : Math::GSL::NTuple::gsl_histogram ############## | ||||||||||
| 233 | |||||||||||
| 234 | package Math::GSL::NTuple::gsl_histogram; | ||||||||||
| 235 | 1 | ▶ | use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 236 | @ISA = qw( Math::GSL::NTuple ); | ||||||||||
| 237 | %OWNER = (); | ||||||||||
| 238 | %ITERATORS = (); | ||||||||||
| 239 | *swig_n_get = *Math::GSL::NTuplec::gsl_histogram_n_get; | ||||||||||
| 240 | *swig_n_set = *Math::GSL::NTuplec::gsl_histogram_n_set; | ||||||||||
| 241 | *swig_range_get = *Math::GSL::NTuplec::gsl_histogram_range_get; | ||||||||||
| 242 | *swig_range_set = *Math::GSL::NTuplec::gsl_histogram_range_set; | ||||||||||
| 243 | *swig_bin_get = *Math::GSL::NTuplec::gsl_histogram_bin_get; | ||||||||||
| 244 | *swig_bin_set = *Math::GSL::NTuplec::gsl_histogram_bin_set; | ||||||||||
| 245 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
| |||||||||||
| 246 | 0 | my $pkg = shift; | |||||||||
| 247 | 0 | my $self = Math::GSL::NTuplec::new_gsl_histogram(@_); | |||||||||
| 248 | 0 | ▶ | bless $self, $pkg if defined($self); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 249 | } | ||||||||||
| 250 | |||||||||||
| 251 | 0 | ▶ | sub DESTROY { | ||||||||
|
Subroutine
DESTROY: not called CC=4 SCAR=30.0
| |||||||||||
| 252 | 0 | ▶ | return unless $_[0]->isa('HASH'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 253 | 0 | my $self = tied(%{$_[0]}); | |||||||||
| 254 | 0 | ▶ | return unless defined $self; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 255 | 0 | delete $ITERATORS{$self}; | |||||||||
| 256 | 0 | ▶ | if (exists $OWNER{$self}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 257 | 0 | Math::GSL::NTuplec::delete_gsl_histogram($self); | |||||||||
| 258 | 0 | delete $OWNER{$self}; | |||||||||
| 259 | } | ||||||||||
| 260 | } | ||||||||||
| 261 | |||||||||||
| 262 | 0 | ▶ | sub DISOWN { | ||||||||
|
Subroutine
DISOWN: not called CC=1 SCAR=6.9
| |||||||||||
| 263 | 0 | my $self = shift; | |||||||||
| 264 | 0 | my $ptr = tied(%$self); | |||||||||
| 265 | 0 | delete $OWNER{$ptr}; | |||||||||
| 266 | } | ||||||||||
| 267 | |||||||||||
| 268 | 0 | ▶ | sub ACQUIRE { | ||||||||
|
Subroutine
ACQUIRE: not called CC=1 SCAR=6.9
| |||||||||||
| 269 | 0 | my $self = shift; | |||||||||
| 270 | 0 | my $ptr = tied(%$self); | |||||||||
| 271 | 0 | $OWNER{$ptr} = 1; | |||||||||
| 272 | } | ||||||||||
| 273 | |||||||||||
| 274 | |||||||||||
| 275 | ############# Class : Math::GSL::NTuple::gsl_histogram_pdf ############## | ||||||||||
| 276 | |||||||||||
| 277 | package Math::GSL::NTuple::gsl_histogram_pdf; | ||||||||||
| 278 | 1 | ▶ | use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 279 | @ISA = qw( Math::GSL::NTuple ); | ||||||||||
| 280 | %OWNER = (); | ||||||||||
| 281 | %ITERATORS = (); | ||||||||||
| 282 | *swig_n_get = *Math::GSL::NTuplec::gsl_histogram_pdf_n_get; | ||||||||||
| 283 | *swig_n_set = *Math::GSL::NTuplec::gsl_histogram_pdf_n_set; | ||||||||||
| 284 | *swig_range_get = *Math::GSL::NTuplec::gsl_histogram_pdf_range_get; | ||||||||||
| 285 | *swig_range_set = *Math::GSL::NTuplec::gsl_histogram_pdf_range_set; | ||||||||||
| 286 | *swig_sum_get = *Math::GSL::NTuplec::gsl_histogram_pdf_sum_get; | ||||||||||
| 287 | *swig_sum_set = *Math::GSL::NTuplec::gsl_histogram_pdf_sum_set; | ||||||||||
| 288 | 0 | ▶ | sub new { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
| |||||||||||
| 289 | 0 | my $pkg = shift; | |||||||||
| 290 | 0 | my $self = Math::GSL::NTuplec::new_gsl_histogram_pdf(@_); | |||||||||
| 291 | 0 | ▶ | bless $self, $pkg if defined($self); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 292 | } | ||||||||||
| 293 | |||||||||||
| 294 | 0 | ▶ | sub DESTROY { | ||||||||
|
Subroutine
DESTROY: not called CC=4 SCAR=30.0
| |||||||||||
| 295 | 0 | ▶ | return unless $_[0]->isa('HASH'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 296 | 0 | my $self = tied(%{$_[0]}); | |||||||||
| 297 | 0 | ▶ | return unless defined $self; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 298 | 0 | delete $ITERATORS{$self}; | |||||||||
| 299 | 0 | ▶ | if (exists $OWNER{$self}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 300 | 0 | Math::GSL::NTuplec::delete_gsl_histogram_pdf($self); | |||||||||
| 301 | 0 | delete $OWNER{$self}; | |||||||||
| 302 | } | ||||||||||
| 303 | } | ||||||||||
| 304 | |||||||||||
| 305 | 0 | ▶ | sub DISOWN { | ||||||||
|
Subroutine
DISOWN: not called CC=1 SCAR=6.9
| |||||||||||
| 306 | 0 | my $self = shift; | |||||||||
| 307 | 0 | my $ptr = tied(%$self); | |||||||||
| 308 | 0 | delete $OWNER{$ptr}; | |||||||||
| 309 | } | ||||||||||
| 310 | |||||||||||
| 311 | 0 | ▶ | sub ACQUIRE { | ||||||||
|
Subroutine
ACQUIRE: not called CC=1 SCAR=6.9
| |||||||||||
| 312 | 0 | my $self = shift; | |||||||||
| 313 | 0 | my $ptr = tied(%$self); | |||||||||
| 314 | 0 | $OWNER{$ptr} = 1; | |||||||||
| 315 | } | ||||||||||
| 316 | |||||||||||
| 317 | |||||||||||
| 318 | # ------- VARIABLE STUBS -------- | ||||||||||
| 319 | |||||||||||
| 320 | package Math::GSL::NTuple; | ||||||||||
| 321 | |||||||||||
| 322 | *GSL_VERSION = *Math::GSL::NTuplec::GSL_VERSION; | ||||||||||
| 323 | *GSL_MAJOR_VERSION = *Math::GSL::NTuplec::GSL_MAJOR_VERSION; | ||||||||||
| 324 | *GSL_MINOR_VERSION = *Math::GSL::NTuplec::GSL_MINOR_VERSION; | ||||||||||
| 325 | *GSL_POSZERO = *Math::GSL::NTuplec::GSL_POSZERO; | ||||||||||
| 326 | *GSL_NEGZERO = *Math::GSL::NTuplec::GSL_NEGZERO; | ||||||||||
| 327 | *GSL_SUCCESS = *Math::GSL::NTuplec::GSL_SUCCESS; | ||||||||||
| 328 | *GSL_FAILURE = *Math::GSL::NTuplec::GSL_FAILURE; | ||||||||||
| 329 | *GSL_CONTINUE = *Math::GSL::NTuplec::GSL_CONTINUE; | ||||||||||
| 330 | *GSL_EDOM = *Math::GSL::NTuplec::GSL_EDOM; | ||||||||||
| 331 | *GSL_ERANGE = *Math::GSL::NTuplec::GSL_ERANGE; | ||||||||||
| 332 | *GSL_EFAULT = *Math::GSL::NTuplec::GSL_EFAULT; | ||||||||||
| 333 | *GSL_EINVAL = *Math::GSL::NTuplec::GSL_EINVAL; | ||||||||||
| 334 | *GSL_EFAILED = *Math::GSL::NTuplec::GSL_EFAILED; | ||||||||||
| 335 | *GSL_EFACTOR = *Math::GSL::NTuplec::GSL_EFACTOR; | ||||||||||
| 336 | *GSL_ESANITY = *Math::GSL::NTuplec::GSL_ESANITY; | ||||||||||
| 337 | *GSL_ENOMEM = *Math::GSL::NTuplec::GSL_ENOMEM; | ||||||||||
| 338 | *GSL_EBADFUNC = *Math::GSL::NTuplec::GSL_EBADFUNC; | ||||||||||
| 339 | *GSL_ERUNAWAY = *Math::GSL::NTuplec::GSL_ERUNAWAY; | ||||||||||
| 340 | *GSL_EMAXITER = *Math::GSL::NTuplec::GSL_EMAXITER; | ||||||||||
| 341 | *GSL_EZERODIV = *Math::GSL::NTuplec::GSL_EZERODIV; | ||||||||||
| 342 | *GSL_EBADTOL = *Math::GSL::NTuplec::GSL_EBADTOL; | ||||||||||
| 343 | *GSL_ETOL = *Math::GSL::NTuplec::GSL_ETOL; | ||||||||||
| 344 | *GSL_EUNDRFLW = *Math::GSL::NTuplec::GSL_EUNDRFLW; | ||||||||||
| 345 | *GSL_EOVRFLW = *Math::GSL::NTuplec::GSL_EOVRFLW; | ||||||||||
| 346 | *GSL_ELOSS = *Math::GSL::NTuplec::GSL_ELOSS; | ||||||||||
| 347 | *GSL_EROUND = *Math::GSL::NTuplec::GSL_EROUND; | ||||||||||
| 348 | *GSL_EBADLEN = *Math::GSL::NTuplec::GSL_EBADLEN; | ||||||||||
| 349 | *GSL_ENOTSQR = *Math::GSL::NTuplec::GSL_ENOTSQR; | ||||||||||
| 350 | *GSL_ESING = *Math::GSL::NTuplec::GSL_ESING; | ||||||||||
| 351 | *GSL_EDIVERGE = *Math::GSL::NTuplec::GSL_EDIVERGE; | ||||||||||
| 352 | *GSL_EUNSUP = *Math::GSL::NTuplec::GSL_EUNSUP; | ||||||||||
| 353 | *GSL_EUNIMPL = *Math::GSL::NTuplec::GSL_EUNIMPL; | ||||||||||
| 354 | *GSL_ECACHE = *Math::GSL::NTuplec::GSL_ECACHE; | ||||||||||
| 355 | *GSL_ETABLE = *Math::GSL::NTuplec::GSL_ETABLE; | ||||||||||
| 356 | *GSL_ENOPROG = *Math::GSL::NTuplec::GSL_ENOPROG; | ||||||||||
| 357 | *GSL_ENOPROGJ = *Math::GSL::NTuplec::GSL_ENOPROGJ; | ||||||||||
| 358 | *GSL_ETOLF = *Math::GSL::NTuplec::GSL_ETOLF; | ||||||||||
| 359 | *GSL_ETOLX = *Math::GSL::NTuplec::GSL_ETOLX; | ||||||||||
| 360 | *GSL_ETOLG = *Math::GSL::NTuplec::GSL_ETOLG; | ||||||||||
| 361 | *GSL_EOF = *Math::GSL::NTuplec::GSL_EOF; | ||||||||||
| 362 | |||||||||||
| 363 | 1 | ▶ | use Data::Dumper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 364 | 1 | ▶ | use Carp qw/croak/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 365 | 0 | ▶ | use Math::GSL::Errno qw/:all/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||||||||||
| 366 | |||||||||||
| 367 | @EXPORT_OK = qw/ | ||||||||||
| 368 | gsl_ntuple_open | ||||||||||
| 369 | gsl_ntuple_create | ||||||||||
| 370 | gsl_ntuple_write | ||||||||||
| 371 | gsl_ntuple_read | ||||||||||
| 372 | gsl_ntuple_bookdata | ||||||||||
| 373 | gsl_ntuple_project | ||||||||||
| 374 | gsl_ntuple_close | ||||||||||
| 375 | /; | ||||||||||
| 376 | %EXPORT_TAGS = ( all => [ @EXPORT_OK ] ); | ||||||||||
| 377 | |||||||||||
| 378 | =encoding utf8 | ||||||||||
| 379 | |||||||||||
| 380 | =head1 NAME | ||||||||||
| 381 | |||||||||||
| 382 | Math::GSL::NTuple - Functions for creating and manipulating ntuples, sets of values | ||||||||||
| 383 | |||||||||||
| 384 | =head1 SYNOPSIS | ||||||||||
| 385 | |||||||||||
| 386 | This module is partially implemented. Patches Welcome! | ||||||||||
| 387 | |||||||||||
| 388 | use Math::GSL::NTuple qw /:all/; | ||||||||||
| 389 | |||||||||||
| 390 | =head1 DESCRIPTION | ||||||||||
| 391 | |||||||||||
| 392 | Here is a list of all the functions in this module : | ||||||||||
| 393 | |||||||||||
| 394 | =over | ||||||||||
| 395 | |||||||||||
| 396 | =cut | ||||||||||
| 397 | |||||||||||
| 398 | sub new | ||||||||||
| 399 | { | ||||||||||
| 400 | my ($class,$values) = @_; | ||||||||||
| 401 | my $this = {}; | ||||||||||
| 402 | my $ntuple = Math::GSL::NTuple::gsl_ntuple->new; | ||||||||||
| 403 | $this->{_ntuple} = $ntuple; | ||||||||||
| 404 | |||||||||||
| 405 | bless $this, $class; | ||||||||||
| 406 | } | ||||||||||
| 407 | |||||||||||
| 408 | sub raw | ||||||||||
| 409 | { | ||||||||||
| 410 | return (shift)->{_ntuple}; | ||||||||||
| 411 | } | ||||||||||
| 412 | |||||||||||
| 413 | =item * <gsl_ntuple_open($filename, $ntuple_data, $size)> | ||||||||||
| 414 | |||||||||||
| 415 | This function opens an existing ntuple file $filename for reading and returns a | ||||||||||
| 416 | pointer to a corresponding ntuple struct. The ntuples in the file must have size | ||||||||||
| 417 | $size. A pointer to memory for the current ntuple row $ntuple_data, which is an | ||||||||||
| 418 | array reference, must be supplied -- this is used to copy ntuples in and out of | ||||||||||
| 419 | the file. | ||||||||||
| 420 | |||||||||||
| 421 | =item * <gsl_ntuple_create> | ||||||||||
| 422 | |||||||||||
| 423 | This function creates a new write-only ntuple file $filename for ntuples of size | ||||||||||
| 424 | $size and returns a pointer to the newly created ntuple struct. Any existing | ||||||||||
| 425 | file with the same name is truncated to zero length and overwritten. A pointer | ||||||||||
| 426 | to memory for the current ntuple row $ntuple_data, which is an array reference, | ||||||||||
| 427 | must be supplied -- this is used to copy ntuples in and out of the file. | ||||||||||
| 428 | |||||||||||
| 429 | |||||||||||
| 430 | =item * <gsl_ntuple_write($ntuple)> | ||||||||||
| 431 | |||||||||||
| 432 | This function writes the current $ntuple $ntuple->{ntuple_data} of size | ||||||||||
| 433 | $ntuple->{size} to the corresponding file. | ||||||||||
| 434 | |||||||||||
| 435 | =item * <gsl_ntuple_bookdata($ntuple)> | ||||||||||
| 436 | |||||||||||
| 437 | This function is a synonym for gsl_ntuple_write. | ||||||||||
| 438 | |||||||||||
| 439 | =item * <gsl_ntuple_read($ntuple)> | ||||||||||
| 440 | |||||||||||
| 441 | This function reads the current row of the ntuple file for ntuple and stores the | ||||||||||
| 442 | values in $ntuple->{data}. | ||||||||||
| 443 | |||||||||||
| 444 | =item * <gsl_ntuple_project()> | ||||||||||
| 445 | |||||||||||
| 446 | =item * <gsl_ntuple_close($ntuple)> | ||||||||||
| 447 | |||||||||||
| 448 | This function closes the ntuple file ntuple and frees its associated allocated | ||||||||||
| 449 | memory. | ||||||||||
| 450 | |||||||||||
| 451 | =back | ||||||||||
| 452 | |||||||||||
| 453 | For more informations on the functions, we refer you to the GSL official | ||||||||||
| 454 | documentation: L<http://www.gnu.org/software/gsl/manual/html_node/> | ||||||||||
| 455 | |||||||||||
| 456 | =head1 AUTHORS | ||||||||||
| 457 | |||||||||||
| 458 | Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com> | ||||||||||
| 459 | |||||||||||
| 460 | =head1 COPYRIGHT AND LICENSE | ||||||||||
| 461 | |||||||||||
| 462 | Copyright (C) 2008-2024 Jonathan "Duke" Leto and Thierry Moisan | ||||||||||
| 463 | |||||||||||
| 464 | This program is free software; you can redistribute it and/or modify it | ||||||||||
| 465 | under the same terms as Perl itself. | ||||||||||
| 466 | |||||||||||
| 467 | =cut | ||||||||||
| 468 | |||||||||||
| 469 | 1; | ||||||||||