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::Integration; 8use base qw(Exporter); 9use base qw(DynaLoader); 10package Math::GSL::Integrationc; 11bootstrap Math::GSL::Integration; 12package Math::GSL::Integration; 13@EXPORT = qw(); 14 15# ---------- BASE METHODS ------------- 16 17package Math::GSL::Integration; 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::Integration; 51 52*gsl_error = *Math::GSL::Integrationc::gsl_error; 53*gsl_stream_printf = *Math::GSL::Integrationc::gsl_stream_printf; 54*gsl_strerror = *Math::GSL::Integrationc::gsl_strerror; 55*gsl_set_error_handler = *Math::GSL::Integrationc::gsl_set_error_handler; 56*gsl_set_error_handler_off = *Math::GSL::Integrationc::gsl_set_error_handler_off; 57*gsl_set_stream_handler = *Math::GSL::Integrationc::gsl_set_stream_handler; 58*gsl_set_stream = *Math::GSL::Integrationc::gsl_set_stream; 59*gsl_integration_workspace_alloc = *Math::GSL::Integrationc::gsl_integration_workspace_alloc; 60*gsl_integration_workspace_free = *Math::GSL::Integrationc::gsl_integration_workspace_free; 61*gsl_integration_qaws_table_alloc = *Math::GSL::Integrationc::gsl_integration_qaws_table_alloc; 62*gsl_integration_qaws_table_set = *Math::GSL::Integrationc::gsl_integration_qaws_table_set; 63*gsl_integration_qaws_table_free = *Math::GSL::Integrationc::gsl_integration_qaws_table_free; 64*gsl_integration_qawo_table_alloc = *Math::GSL::Integrationc::gsl_integration_qawo_table_alloc; 65*gsl_integration_qawo_table_set = *Math::GSL::Integrationc::gsl_integration_qawo_table_set; 66*gsl_integration_qawo_table_set_length = *Math::GSL::Integrationc::gsl_integration_qawo_table_set_length; 67*gsl_integration_qawo_table_free = *Math::GSL::Integrationc::gsl_integration_qawo_table_free; 68*gsl_integration_qk15 = *Math::GSL::Integrationc::gsl_integration_qk15; 69*gsl_integration_qk21 = *Math::GSL::Integrationc::gsl_integration_qk21; 70*gsl_integration_qk31 = *Math::GSL::Integrationc::gsl_integration_qk31; 71*gsl_integration_qk41 = *Math::GSL::Integrationc::gsl_integration_qk41; 72*gsl_integration_qk51 = *Math::GSL::Integrationc::gsl_integration_qk51; 73*gsl_integration_qk61 = *Math::GSL::Integrationc::gsl_integration_qk61; 74*gsl_integration_qcheb = *Math::GSL::Integrationc::gsl_integration_qcheb; 75*gsl_integration_qk = *Math::GSL::Integrationc::gsl_integration_qk; 76*gsl_integration_qng = *Math::GSL::Integrationc::gsl_integration_qng; 77*gsl_integration_qag = *Math::GSL::Integrationc::gsl_integration_qag; 78*gsl_integration_qagi = *Math::GSL::Integrationc::gsl_integration_qagi; 79*gsl_integration_qagiu = *Math::GSL::Integrationc::gsl_integration_qagiu; 80*gsl_integration_qagil = *Math::GSL::Integrationc::gsl_integration_qagil; 81*gsl_integration_qags = *Math::GSL::Integrationc::gsl_integration_qags; 82*gsl_integration_qagp = *Math::GSL::Integrationc::gsl_integration_qagp; 83*gsl_integration_qawc = *Math::GSL::Integrationc::gsl_integration_qawc; 84*gsl_integration_qaws = *Math::GSL::Integrationc::gsl_integration_qaws; 85*gsl_integration_qawo = *Math::GSL::Integrationc::gsl_integration_qawo; 86*gsl_integration_qawf = *Math::GSL::Integrationc::gsl_integration_qawf; 87*gsl_integration_glfixed_table_alloc = *Math::GSL::Integrationc::gsl_integration_glfixed_table_alloc; 88*gsl_integration_glfixed_table_free = *Math::GSL::Integrationc::gsl_integration_glfixed_table_free; 89*gsl_integration_glfixed = *Math::GSL::Integrationc::gsl_integration_glfixed; 90*gsl_integration_glfixed_point = *Math::GSL::Integrationc::gsl_integration_glfixed_point; 91*gsl_integration_cquad_workspace_alloc = *Math::GSL::Integrationc::gsl_integration_cquad_workspace_alloc; 92*gsl_integration_cquad_workspace_free = *Math::GSL::Integrationc::gsl_integration_cquad_workspace_free; 93*gsl_integration_cquad = *Math::GSL::Integrationc::gsl_integration_cquad; 94 95############# Class : Math::GSL::Integration::gsl_integration_workspace ############## 96 97package Math::GSL::Integration::gsl_integration_workspace; 98use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 99@ISA = qw( Math::GSL::Integration ); 100%OWNER = (); 101%ITERATORS = (); 102*swig_limit_get = *Math::GSL::Integrationc::gsl_integration_workspace_limit_get; 103*swig_limit_set = *Math::GSL::Integrationc::gsl_integration_workspace_limit_set; 104*swig_size_get = *Math::GSL::Integrationc::gsl_integration_workspace_size_get; 105*swig_size_set = *Math::GSL::Integrationc::gsl_integration_workspace_size_set; 106*swig_nrmax_get = *Math::GSL::Integrationc::gsl_integration_workspace_nrmax_get; 107*swig_nrmax_set = *Math::GSL::Integrationc::gsl_integration_workspace_nrmax_set; 108*swig_i_get = *Math::GSL::Integrationc::gsl_integration_workspace_i_get; 109*swig_i_set = *Math::GSL::Integrationc::gsl_integration_workspace_i_set; 110*swig_maximum_level_get = *Math::GSL::Integrationc::gsl_integration_workspace_maximum_level_get; 111*swig_maximum_level_set = *Math::GSL::Integrationc::gsl_integration_workspace_maximum_level_set; 112*swig_alist_get = *Math::GSL::Integrationc::gsl_integration_workspace_alist_get; 113*swig_alist_set = *Math::GSL::Integrationc::gsl_integration_workspace_alist_set; 114*swig_blist_get = *Math::GSL::Integrationc::gsl_integration_workspace_blist_get; 115*swig_blist_set = *Math::GSL::Integrationc::gsl_integration_workspace_blist_set; 116*swig_rlist_get = *Math::GSL::Integrationc::gsl_integration_workspace_rlist_get; 117*swig_rlist_set = *Math::GSL::Integrationc::gsl_integration_workspace_rlist_set; 118*swig_elist_get = *Math::GSL::Integrationc::gsl_integration_workspace_elist_get; 119*swig_elist_set = *Math::GSL::Integrationc::gsl_integration_workspace_elist_set; 120*swig_order_get = *Math::GSL::Integrationc::gsl_integration_workspace_order_get; 121*swig_order_set = *Math::GSL::Integrationc::gsl_integration_workspace_order_set; 122*swig_level_get = *Math::GSL::Integrationc::gsl_integration_workspace_level_get; 123*swig_level_set = *Math::GSL::Integrationc::gsl_integration_workspace_level_set; 124sub new { 125 my $pkg = shift; 126 my $self = Math::GSL::Integrationc::new_gsl_integration_workspace(@_); 127 bless $self, $pkg if defined($self); 128} 129 130sub DESTROY { 131 return unless $_[0]->isa('HASH'); 132 my $self = tied(%{$_[0]}); 133 return unless defined $self; 134 delete $ITERATORS{$self}; 135 if (exists $OWNER{$self}) { 136 Math::GSL::Integrationc::delete_gsl_integration_workspace($self); 137 delete $OWNER{$self}; 138 } 139} 140 141sub DISOWN { 142 my $self = shift; 143 my $ptr = tied(%$self); 144 delete $OWNER{$ptr}; 145} 146 147sub ACQUIRE { 148 my $self = shift; 149 my $ptr = tied(%$self); 150 $OWNER{$ptr} = 1; 151} 152 153 154############# Class : Math::GSL::Integration::gsl_integration_qaws_table ############## 155 156package Math::GSL::Integration::gsl_integration_qaws_table; 157use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 158@ISA = qw( Math::GSL::Integration ); 159%OWNER = (); 160%ITERATORS = (); 161*swig_alpha_get = *Math::GSL::Integrationc::gsl_integration_qaws_table_alpha_get; 162*swig_alpha_set = *Math::GSL::Integrationc::gsl_integration_qaws_table_alpha_set; 163*swig_beta_get = *Math::GSL::Integrationc::gsl_integration_qaws_table_beta_get; 164*swig_beta_set = *Math::GSL::Integrationc::gsl_integration_qaws_table_beta_set; 165*swig_mu_get = *Math::GSL::Integrationc::gsl_integration_qaws_table_mu_get; 166*swig_mu_set = *Math::GSL::Integrationc::gsl_integration_qaws_table_mu_set; 167*swig_nu_get = *Math::GSL::Integrationc::gsl_integration_qaws_table_nu_get; 168*swig_nu_set = *Math::GSL::Integrationc::gsl_integration_qaws_table_nu_set; 169*swig_ri_get = *Math::GSL::Integrationc::gsl_integration_qaws_table_ri_get; 170*swig_ri_set = *Math::GSL::Integrationc::gsl_integration_qaws_table_ri_set; 171*swig_rj_get = *Math::GSL::Integrationc::gsl_integration_qaws_table_rj_get; 172*swig_rj_set = *Math::GSL::Integrationc::gsl_integration_qaws_table_rj_set; 173*swig_rg_get = *Math::GSL::Integrationc::gsl_integration_qaws_table_rg_get; 174*swig_rg_set = *Math::GSL::Integrationc::gsl_integration_qaws_table_rg_set; 175*swig_rh_get = *Math::GSL::Integrationc::gsl_integration_qaws_table_rh_get; 176*swig_rh_set = *Math::GSL::Integrationc::gsl_integration_qaws_table_rh_set; 177sub new { 178 my $pkg = shift; 179 my $self = Math::GSL::Integrationc::new_gsl_integration_qaws_table(@_); 180 bless $self, $pkg if defined($self); 181} 182 183sub DESTROY { 184 return unless $_[0]->isa('HASH'); 185 my $self = tied(%{$_[0]}); 186 return unless defined $self; 187 delete $ITERATORS{$self}; 188 if (exists $OWNER{$self}) { 189 Math::GSL::Integrationc::delete_gsl_integration_qaws_table($self); 190 delete $OWNER{$self}; 191 } 192} 193 194sub DISOWN { 195 my $self = shift; 196 my $ptr = tied(%$self); 197 delete $OWNER{$ptr}; 198} 199 200sub ACQUIRE { 201 my $self = shift; 202 my $ptr = tied(%$self); 203 $OWNER{$ptr} = 1; 204} 205 206 207############# Class : Math::GSL::Integration::gsl_integration_qawo_table ############## 208 209package Math::GSL::Integration::gsl_integration_qawo_table; 210use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 211@ISA = qw( Math::GSL::Integration ); 212%OWNER = (); 213%ITERATORS = (); 214*swig_n_get = *Math::GSL::Integrationc::gsl_integration_qawo_table_n_get; 215*swig_n_set = *Math::GSL::Integrationc::gsl_integration_qawo_table_n_set; 216*swig_omega_get = *Math::GSL::Integrationc::gsl_integration_qawo_table_omega_get; 217*swig_omega_set = *Math::GSL::Integrationc::gsl_integration_qawo_table_omega_set; 218*swig_L_get = *Math::GSL::Integrationc::gsl_integration_qawo_table_L_get; 219*swig_L_set = *Math::GSL::Integrationc::gsl_integration_qawo_table_L_set; 220*swig_par_get = *Math::GSL::Integrationc::gsl_integration_qawo_table_par_get; 221*swig_par_set = *Math::GSL::Integrationc::gsl_integration_qawo_table_par_set; 222*swig_sine_get = *Math::GSL::Integrationc::gsl_integration_qawo_table_sine_get; 223*swig_sine_set = *Math::GSL::Integrationc::gsl_integration_qawo_table_sine_set; 224*swig_chebmo_get = *Math::GSL::Integrationc::gsl_integration_qawo_table_chebmo_get; 225*swig_chebmo_set = *Math::GSL::Integrationc::gsl_integration_qawo_table_chebmo_set; 226sub new { 227 my $pkg = shift; 228 my $self = Math::GSL::Integrationc::new_gsl_integration_qawo_table(@_); 229 bless $self, $pkg if defined($self); 230} 231 232sub DESTROY { 233 return unless $_[0]->isa('HASH'); 234 my $self = tied(%{$_[0]}); 235 return unless defined $self; 236 delete $ITERATORS{$self}; 237 if (exists $OWNER{$self}) { 238 Math::GSL::Integrationc::delete_gsl_integration_qawo_table($self); 239 delete $OWNER{$self}; 240 } 241} 242 243sub DISOWN { 244 my $self = shift; 245 my $ptr = tied(%$self); 246 delete $OWNER{$ptr}; 247} 248 249sub ACQUIRE { 250 my $self = shift; 251 my $ptr = tied(%$self); 252 $OWNER{$ptr} = 1; 253} 254 255 256############# Class : Math::GSL::Integration::gsl_integration_glfixed_table ############## 257 258package Math::GSL::Integration::gsl_integration_glfixed_table; 259use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 260@ISA = qw( Math::GSL::Integration ); 261%OWNER = (); 262%ITERATORS = (); 263*swig_n_get = *Math::GSL::Integrationc::gsl_integration_glfixed_table_n_get; 264*swig_n_set = *Math::GSL::Integrationc::gsl_integration_glfixed_table_n_set; 265*swig_x_get = *Math::GSL::Integrationc::gsl_integration_glfixed_table_x_get; 266*swig_x_set = *Math::GSL::Integrationc::gsl_integration_glfixed_table_x_set; 267*swig_w_get = *Math::GSL::Integrationc::gsl_integration_glfixed_table_w_get; 268*swig_w_set = *Math::GSL::Integrationc::gsl_integration_glfixed_table_w_set; 269*swig_precomputed_get = *Math::GSL::Integrationc::gsl_integration_glfixed_table_precomputed_get; 270*swig_precomputed_set = *Math::GSL::Integrationc::gsl_integration_glfixed_table_precomputed_set; 271sub new { 272 my $pkg = shift; 273 my $self = Math::GSL::Integrationc::new_gsl_integration_glfixed_table(@_); 274 bless $self, $pkg if defined($self); 275} 276 277sub DESTROY { 278 return unless $_[0]->isa('HASH'); 279 my $self = tied(%{$_[0]}); 280 return unless defined $self; 281 delete $ITERATORS{$self}; 282 if (exists $OWNER{$self}) { 283 Math::GSL::Integrationc::delete_gsl_integration_glfixed_table($self); 284 delete $OWNER{$self}; 285 } 286} 287 288sub DISOWN { 289 my $self = shift; 290 my $ptr = tied(%$self); 291 delete $OWNER{$ptr}; 292} 293 294sub ACQUIRE { 295 my $self = shift; 296 my $ptr = tied(%$self); 297 $OWNER{$ptr} = 1; 298} 299 300 301############# Class : Math::GSL::Integration::gsl_integration_cquad_ival ############## 302 303package Math::GSL::Integration::gsl_integration_cquad_ival; 304use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 305@ISA = qw( Math::GSL::Integration ); 306%OWNER = (); 307%ITERATORS = (); 308*swig_a_get = *Math::GSL::Integrationc::gsl_integration_cquad_ival_a_get; 309*swig_a_set = *Math::GSL::Integrationc::gsl_integration_cquad_ival_a_set; 310*swig_b_get = *Math::GSL::Integrationc::gsl_integration_cquad_ival_b_get; 311*swig_b_set = *Math::GSL::Integrationc::gsl_integration_cquad_ival_b_set; 312*swig_c_get = *Math::GSL::Integrationc::gsl_integration_cquad_ival_c_get; 313*swig_c_set = *Math::GSL::Integrationc::gsl_integration_cquad_ival_c_set; 314*swig_fx_get = *Math::GSL::Integrationc::gsl_integration_cquad_ival_fx_get; 315*swig_fx_set = *Math::GSL::Integrationc::gsl_integration_cquad_ival_fx_set; 316*swig_igral_get = *Math::GSL::Integrationc::gsl_integration_cquad_ival_igral_get; 317*swig_igral_set = *Math::GSL::Integrationc::gsl_integration_cquad_ival_igral_set; 318*swig_err_get = *Math::GSL::Integrationc::gsl_integration_cquad_ival_err_get; 319*swig_err_set = *Math::GSL::Integrationc::gsl_integration_cquad_ival_err_set; 320*swig_depth_get = *Math::GSL::Integrationc::gsl_integration_cquad_ival_depth_get; 321*swig_depth_set = *Math::GSL::Integrationc::gsl_integration_cquad_ival_depth_set; 322*swig_rdepth_get = *Math::GSL::Integrationc::gsl_integration_cquad_ival_rdepth_get; 323*swig_rdepth_set = *Math::GSL::Integrationc::gsl_integration_cquad_ival_rdepth_set; 324*swig_ndiv_get = *Math::GSL::Integrationc::gsl_integration_cquad_ival_ndiv_get; 325*swig_ndiv_set = *Math::GSL::Integrationc::gsl_integration_cquad_ival_ndiv_set; 326sub new { 327 my $pkg = shift; 328 my $self = Math::GSL::Integrationc::new_gsl_integration_cquad_ival(@_); 329 bless $self, $pkg if defined($self); 330} 331 332sub DESTROY { 333 return unless $_[0]->isa('HASH'); 334 my $self = tied(%{$_[0]}); 335 return unless defined $self; 336 delete $ITERATORS{$self}; 337 if (exists $OWNER{$self}) { 338 Math::GSL::Integrationc::delete_gsl_integration_cquad_ival($self); 339 delete $OWNER{$self}; 340 } 341} 342 343sub DISOWN { 344 my $self = shift; 345 my $ptr = tied(%$self); 346 delete $OWNER{$ptr}; 347} 348 349sub ACQUIRE { 350 my $self = shift; 351 my $ptr = tied(%$self); 352 $OWNER{$ptr} = 1; 353} 354 355 356############# Class : Math::GSL::Integration::gsl_integration_cquad_workspace ############## 357 358package Math::GSL::Integration::gsl_integration_cquad_workspace; 359use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 360@ISA = qw( Math::GSL::Integration ); 361%OWNER = (); 362%ITERATORS = (); 363*swig_size_get = *Math::GSL::Integrationc::gsl_integration_cquad_workspace_size_get; 364*swig_size_set = *Math::GSL::Integrationc::gsl_integration_cquad_workspace_size_set; 365*swig_ivals_get = *Math::GSL::Integrationc::gsl_integration_cquad_workspace_ivals_get; 366*swig_ivals_set = *Math::GSL::Integrationc::gsl_integration_cquad_workspace_ivals_set; 367*swig_heap_get = *Math::GSL::Integrationc::gsl_integration_cquad_workspace_heap_get; 368*swig_heap_set = *Math::GSL::Integrationc::gsl_integration_cquad_workspace_heap_set; 369sub new { 370 my $pkg = shift; 371 my $self = Math::GSL::Integrationc::new_gsl_integration_cquad_workspace(@_); 372 bless $self, $pkg if defined($self); 373} 374 375sub DESTROY { 376 return unless $_[0]->isa('HASH'); 377 my $self = tied(%{$_[0]}); 378 return unless defined $self; 379 delete $ITERATORS{$self}; 380 if (exists $OWNER{$self}) { 381 Math::GSL::Integrationc::delete_gsl_integration_cquad_workspace($self); 382 delete $OWNER{$self}; 383 } 384} 385 386sub DISOWN { 387 my $self = shift; 388 my $ptr = tied(%$self); 389 delete $OWNER{$ptr}; 390} 391 392sub ACQUIRE { 393 my $self = shift; 394 my $ptr = tied(%$self); 395 $OWNER{$ptr} = 1; 396} 397 398 399############# Class : Math::GSL::Integration::gsl_function_struct ############## 400 401package Math::GSL::Integration::gsl_function_struct; 402use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 403@ISA = qw( Math::GSL::Integration ); 404%OWNER = (); 405%ITERATORS = (); 406*swig_function_get = *Math::GSL::Integrationc::gsl_function_struct_function_get; 407*swig_function_set = *Math::GSL::Integrationc::gsl_function_struct_function_set; 408*swig_params_get = *Math::GSL::Integrationc::gsl_function_struct_params_get; 409*swig_params_set = *Math::GSL::Integrationc::gsl_function_struct_params_set; 410sub new { 411 my $pkg = shift; 412 my $self = Math::GSL::Integrationc::new_gsl_function_struct(@_); 413 bless $self, $pkg if defined($self); 414} 415 416sub DESTROY { 417 return unless $_[0]->isa('HASH'); 418 my $self = tied(%{$_[0]}); 419 return unless defined $self; 420 delete $ITERATORS{$self}; 421 if (exists $OWNER{$self}) { 422 Math::GSL::Integrationc::delete_gsl_function_struct($self); 423 delete $OWNER{$self}; 424 } 425} 426 427sub DISOWN { 428 my $self = shift; 429 my $ptr = tied(%$self); 430 delete $OWNER{$ptr}; 431} 432 433sub ACQUIRE { 434 my $self = shift; 435 my $ptr = tied(%$self); 436 $OWNER{$ptr} = 1; 437} 438 439 440############# Class : Math::GSL::Integration::gsl_function_fdf_struct ############## 441 442package Math::GSL::Integration::gsl_function_fdf_struct; 443use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 444@ISA = qw( Math::GSL::Integration ); 445%OWNER = (); 446%ITERATORS = (); 447*swig_f_get = *Math::GSL::Integrationc::gsl_function_fdf_struct_f_get; 448*swig_f_set = *Math::GSL::Integrationc::gsl_function_fdf_struct_f_set; 449*swig_df_get = *Math::GSL::Integrationc::gsl_function_fdf_struct_df_get; 450*swig_df_set = *Math::GSL::Integrationc::gsl_function_fdf_struct_df_set; 451*swig_fdf_get = *Math::GSL::Integrationc::gsl_function_fdf_struct_fdf_get; 452*swig_fdf_set = *Math::GSL::Integrationc::gsl_function_fdf_struct_fdf_set; 453*swig_params_get = *Math::GSL::Integrationc::gsl_function_fdf_struct_params_get; 454*swig_params_set = *Math::GSL::Integrationc::gsl_function_fdf_struct_params_set; 455sub new { 456 my $pkg = shift; 457 my $self = Math::GSL::Integrationc::new_gsl_function_fdf_struct(@_); 458 bless $self, $pkg if defined($self); 459} 460 461sub DESTROY { 462 return unless $_[0]->isa('HASH'); 463 my $self = tied(%{$_[0]}); 464 return unless defined $self; 465 delete $ITERATORS{$self}; 466 if (exists $OWNER{$self}) { 467 Math::GSL::Integrationc::delete_gsl_function_fdf_struct($self); 468 delete $OWNER{$self}; 469 } 470} 471 472sub DISOWN { 473 my $self = shift; 474 my $ptr = tied(%$self); 475 delete $OWNER{$ptr}; 476} 477 478sub ACQUIRE { 479 my $self = shift; 480 my $ptr = tied(%$self); 481 $OWNER{$ptr} = 1; 482} 483 484 485############# Class : Math::GSL::Integration::gsl_function_vec_struct ############## 486 487package Math::GSL::Integration::gsl_function_vec_struct; 488use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 489@ISA = qw( Math::GSL::Integration ); 490%OWNER = (); 491%ITERATORS = (); 492*swig_function_get = *Math::GSL::Integrationc::gsl_function_vec_struct_function_get; 493*swig_function_set = *Math::GSL::Integrationc::gsl_function_vec_struct_function_set; 494*swig_params_get = *Math::GSL::Integrationc::gsl_function_vec_struct_params_get; 495*swig_params_set = *Math::GSL::Integrationc::gsl_function_vec_struct_params_set; 496sub new { 497 my $pkg = shift; 498 my $self = Math::GSL::Integrationc::new_gsl_function_vec_struct(@_); 499 bless $self, $pkg if defined($self); 500} 501 502sub DESTROY { 503 return unless $_[0]->isa('HASH'); 504 my $self = tied(%{$_[0]}); 505 return unless defined $self; 506 delete $ITERATORS{$self}; 507 if (exists $OWNER{$self}) { 508 Math::GSL::Integrationc::delete_gsl_function_vec_struct($self); 509 delete $OWNER{$self}; 510 } 511} 512 513sub DISOWN { 514 my $self = shift; 515 my $ptr = tied(%$self); 516 delete $OWNER{$ptr}; 517} 518 519sub ACQUIRE { 520 my $self = shift; 521 my $ptr = tied(%$self); 522 $OWNER{$ptr} = 1; 523} 524 525 526# ------- VARIABLE STUBS -------- 527 528package Math::GSL::Integration; 529 530*GSL_VERSION = *Math::GSL::Integrationc::GSL_VERSION; 531*GSL_MAJOR_VERSION = *Math::GSL::Integrationc::GSL_MAJOR_VERSION; 532*GSL_MINOR_VERSION = *Math::GSL::Integrationc::GSL_MINOR_VERSION; 533*GSL_POSZERO = *Math::GSL::Integrationc::GSL_POSZERO; 534*GSL_NEGZERO = *Math::GSL::Integrationc::GSL_NEGZERO; 535*GSL_SUCCESS = *Math::GSL::Integrationc::GSL_SUCCESS; 536*GSL_FAILURE = *Math::GSL::Integrationc::GSL_FAILURE; 537*GSL_CONTINUE = *Math::GSL::Integrationc::GSL_CONTINUE; 538*GSL_EDOM = *Math::GSL::Integrationc::GSL_EDOM; 539*GSL_ERANGE = *Math::GSL::Integrationc::GSL_ERANGE; 540*GSL_EFAULT = *Math::GSL::Integrationc::GSL_EFAULT; 541*GSL_EINVAL = *Math::GSL::Integrationc::GSL_EINVAL; 542*GSL_EFAILED = *Math::GSL::Integrationc::GSL_EFAILED; 543*GSL_EFACTOR = *Math::GSL::Integrationc::GSL_EFACTOR; 544*GSL_ESANITY = *Math::GSL::Integrationc::GSL_ESANITY; 545*GSL_ENOMEM = *Math::GSL::Integrationc::GSL_ENOMEM; 546*GSL_EBADFUNC = *Math::GSL::Integrationc::GSL_EBADFUNC; 547*GSL_ERUNAWAY = *Math::GSL::Integrationc::GSL_ERUNAWAY; 548*GSL_EMAXITER = *Math::GSL::Integrationc::GSL_EMAXITER; 549*GSL_EZERODIV = *Math::GSL::Integrationc::GSL_EZERODIV; 550*GSL_EBADTOL = *Math::GSL::Integrationc::GSL_EBADTOL; 551*GSL_ETOL = *Math::GSL::Integrationc::GSL_ETOL; 552*GSL_EUNDRFLW = *Math::GSL::Integrationc::GSL_EUNDRFLW; 553*GSL_EOVRFLW = *Math::GSL::Integrationc::GSL_EOVRFLW; 554*GSL_ELOSS = *Math::GSL::Integrationc::GSL_ELOSS; 555*GSL_EROUND = *Math::GSL::Integrationc::GSL_EROUND; 556*GSL_EBADLEN = *Math::GSL::Integrationc::GSL_EBADLEN; 557*GSL_ENOTSQR = *Math::GSL::Integrationc::GSL_ENOTSQR; 558*GSL_ESING = *Math::GSL::Integrationc::GSL_ESING; 559*GSL_EDIVERGE = *Math::GSL::Integrationc::GSL_EDIVERGE; 560*GSL_EUNSUP = *Math::GSL::Integrationc::GSL_EUNSUP; 561*GSL_EUNIMPL = *Math::GSL::Integrationc::GSL_EUNIMPL; 562*GSL_ECACHE = *Math::GSL::Integrationc::GSL_ECACHE; 563*GSL_ETABLE = *Math::GSL::Integrationc::GSL_ETABLE; 564*GSL_ENOPROG = *Math::GSL::Integrationc::GSL_ENOPROG; 565*GSL_ENOPROGJ = *Math::GSL::Integrationc::GSL_ENOPROGJ; 566*GSL_ETOLF = *Math::GSL::Integrationc::GSL_ETOLF; 567*GSL_ETOLX = *Math::GSL::Integrationc::GSL_ETOLX; 568*GSL_ETOLG = *Math::GSL::Integrationc::GSL_ETOLG; 569*GSL_EOF = *Math::GSL::Integrationc::GSL_EOF; 570*GSL_INTEG_COSINE = *Math::GSL::Integrationc::GSL_INTEG_COSINE; 571*GSL_INTEG_SINE = *Math::GSL::Integrationc::GSL_INTEG_SINE; 572*GSL_INTEG_GAUSS15 = *Math::GSL::Integrationc::GSL_INTEG_GAUSS15; 573*GSL_INTEG_GAUSS21 = *Math::GSL::Integrationc::GSL_INTEG_GAUSS21; 574*GSL_INTEG_GAUSS31 = *Math::GSL::Integrationc::GSL_INTEG_GAUSS31; 575*GSL_INTEG_GAUSS41 = *Math::GSL::Integrationc::GSL_INTEG_GAUSS41; 576*GSL_INTEG_GAUSS51 = *Math::GSL::Integrationc::GSL_INTEG_GAUSS51; 577*GSL_INTEG_GAUSS61 = *Math::GSL::Integrationc::GSL_INTEG_GAUSS61; 578*M_E = *Math::GSL::Integrationc::M_E; 579*M_LOG2E = *Math::GSL::Integrationc::M_LOG2E; 580*M_LOG10E = *Math::GSL::Integrationc::M_LOG10E; 581*M_SQRT2 = *Math::GSL::Integrationc::M_SQRT2; 582*M_SQRT1_2 = *Math::GSL::Integrationc::M_SQRT1_2; 583*M_SQRT3 = *Math::GSL::Integrationc::M_SQRT3; 584*M_PI = *Math::GSL::Integrationc::M_PI; 585*M_PI_2 = *Math::GSL::Integrationc::M_PI_2; 586*M_PI_4 = *Math::GSL::Integrationc::M_PI_4; 587*M_SQRTPI = *Math::GSL::Integrationc::M_SQRTPI; 588*M_2_SQRTPI = *Math::GSL::Integrationc::M_2_SQRTPI; 589*M_1_PI = *Math::GSL::Integrationc::M_1_PI; 590*M_2_PI = *Math::GSL::Integrationc::M_2_PI; 591*M_LN10 = *Math::GSL::Integrationc::M_LN10; 592*M_LN2 = *Math::GSL::Integrationc::M_LN2; 593*M_LNPI = *Math::GSL::Integrationc::M_LNPI; 594*M_EULER = *Math::GSL::Integrationc::M_EULER; 595 596@EXPORT_OK = qw/ 597 gsl_integration_workspace_alloc 598 gsl_integration_workspace_free 599 gsl_integration_qaws_table_alloc 600 gsl_integration_qaws_table_set 601 gsl_integration_qaws_table_free 602 gsl_integration_qawo_table_alloc 603 gsl_integration_qawo_table_set 604 gsl_integration_qawo_table_set_length 605 gsl_integration_qawo_table_free 606 gsl_integration_qk15 607 gsl_integration_qk21 608 gsl_integration_qk31 609 gsl_integration_qk41 610 gsl_integration_qk51 611 gsl_integration_qk61 612 gsl_integration_qcheb 613 gsl_integration_qk 614 gsl_integration_qng 615 gsl_integration_qag 616 gsl_integration_qagi 617 gsl_integration_qagiu 618 gsl_integration_qagil 619 gsl_integration_qags 620 gsl_integration_qagp 621 gsl_integration_qawc 622 gsl_integration_qaws 623 gsl_integration_qawo 624 gsl_integration_qawf 625 $GSL_INTEG_COSINE 626 $GSL_INTEG_SINE 627 $GSL_INTEG_GAUSS15 628 $GSL_INTEG_GAUSS21 629 $GSL_INTEG_GAUSS31 630 $GSL_INTEG_GAUSS41 631 $GSL_INTEG_GAUSS51 632 $GSL_INTEG_GAUSS61 633 /; 634%EXPORT_TAGS = ( all => [ @EXPORT_OK ] ); 635 636__END__ 637 638=encoding utf8 639 640=head1 NAME 641 642Math::GSL::Integration - Routines for performing numerical integration (quadrature) of a function in one dimension 643 644=head1 SYNOPSIS 645 646 use Math::GSL::Integration qw /:all/; 647 648 my $function = sub { $_[0]**2 } ; 649 my ($lower, $upper ) = (0,1); 650 my ($relerr,$abserr) = (0,1e-7); 651 652 my ($status, $result, $abserr, $num_evals) = gsl_integration_qng ( $function, 653 $lower, $upper, $relerr, $abserr 654 ); 655 656=head1 DESCRIPTION 657 658This module allows you to numerically integrate a Perl subroutine. Depending 659on the properties of your function (singularities, smoothness) and the type 660of integration range (finite, infinite, semi-infinite), you will need to 661choose a quadrature routine that fits your needs. 662 663 664=over 665 666=item * C<gsl_integration_workspace_alloc($n)> 667 668This function allocates a workspace sufficient to hold $n double precision 669intervals, their integration results and error estimates. 670 671=item * C<gsl_integration_workspace_free($w)> 672 673 This function frees the memory associated with the workspace $w. 674 675=item * C<gsl_integration_qaws_table_alloc($alpha, $beta, $mu, $nu)> 676 677 This function allocates space for a gsl_integration_qaws_table struct 678 describing a singular weight function W(x) with the parameters ($alpha, $beta, 679 $mu, $nu), W(x) = (x-a)^alpha (b-x)^beta log^mu (x-a) log^nu (b-x) where 680 $alpha > -1, $beta > -1, and $mu = 0, 1, $nu = 0, 1. The weight function can 681 take four different forms depending on the values of $mu and $nu, 682 683 W(x) = (x-a)^alpha (b-x)^beta (mu = 0, nu = 0) 684 W(x) = (x-a)^alpha (b-x)^beta log(x-a) (mu = 1, nu = 0) 685 W(x) = (x-a)^alpha (b-x)^beta log(b-x) (mu = 0, nu = 1) 686 W(x) = (x-a)^alpha (b-x)^beta log(x-a) log(b-x) (mu = 1, nu = 1) 687 688The singular points (a,b) do not have to be specified until the integral is 689computed, where they are the endpoints of the integration range. The function 690returns a pointer to the newly allocated table gsl_integration_qaws_table if no 691errors were detected, and 0 in the case of error. 692 693=item * C<gsl_integration_qaws_table_set($t, $alpha, $beta, $mu, $nu)> 694 695 This function modifies the parameters ($alpha, $beta, $mu, $nu) of an existing 696 gsl_integration_qaws_table struct $t. 697 698=item * C<gsl_integration_qaws_table_free($t)> 699 700 This function frees all the memory associated with the 701 gsl_integration_qaws_table struct $t. 702 703=item * C<gsl_integration_qawo_table_alloc($omega, $L, $sine, $n)> 704 705=item * C<gsl_integration_qawo_table_set($t, $omega, $L, $sine, $n)> 706 707 This function changes the parameters omega, L and sine of the existing 708 workspace $t. 709 710=item * C<gsl_integration_qawo_table_set_length($t, $L)> 711 712 This function allows the length parameter $L of the workspace $t to be 713 changed. 714 715=item * C<gsl_integration_qawo_table_free($t)> 716 717 This function frees all the memory associated with the workspace $t. 718 719=item * C<gsl_integration_qk15($function,$a,$b,$resabs,$resasc) > 720 721=item * C<gsl_integration_qk21($function,$a,$b,$resabs,$resasc) > 722 723=item * C<gsl_integration_qk31($function,$a,$b,$resabs,$resasc) > 724 725=item * C<gsl_integration_qk41($function,$a,$b,$resabs,$resasc) > 726 727=item * C<gsl_integration_qk51($function,$a,$b,$resabs,$resasc) > 728 729=item * C<gsl_integration_qk61($function,$a,$b,$resabs,$resasc) > 730 731=item * C<gsl_integration_qcheb($function, $a, $b, $cheb12, $cheb24) > 732 733=item * C<gsl_integration_qk > 734 735=item * C<gsl_integration_qng($function,$a,$b,$epsabs,$epsrel,$num_evals) > 736 737This routine QNG (Quadrature Non-Adaptive Gaussian) is inexpensive is the sense 738that it will evaluate the function much fewer times than the adaptive routines. 739Because of this it does not need any workspaces, so it is also more memory 740efficient. It should be perfectly fine for well-behaved functions (smooth and 741nonsingular), but will not be able to get the required accuracy or may not 742converge for more complicated functions. 743 744=item * C<gsl_integration_qag($function,$a,$b,$epsabs,$epsrel,$limit,$key,$workspace) > 745 746This routine QAG (Quadrature Adaptive Gaussian) ... 747 748=item * C<gsl_integration_qagi($function,$epsabs,$epsrel,$limit,$workspace) > 749 750=item * C<gsl_integration_qagiu($function,$a,$epsabs,$epsrel,$limit,$workspace) > 751 752=item * C<gsl_integration_qagil($function,$b,$epsabs,$epsrel,$limit,$workspace) > 753 754=item * C<gsl_integration_qags($func,$a,$b,$epsabs,$epsrel,$limit,$workspace)> 755 756 ($status, $result, $abserr) = gsl_integration_qags ( 757 sub { 1/$_[0]} , 758 1, 10, 0, 1e-7, 1000, 759 $workspace, 760 ); 761 762 This function applies the Gauss-Kronrod 21-point integration rule 763 adaptively until an estimate of the integral of $func over ($a,$b) is 764 achieved within the desired absolute and relative error limits, 765 $epsabs and $epsrel. 766 767 768=item * C<gsl_integration_qagp($function, $pts, $npts, $epsbs, $epsrel, $limit, $workspace) > 769 770=item * C<gsl_integration_qawc($function, $a, $b, $c, $epsabs, $epsrel, $limit, $workspace) > 771 772=item * C<gsl_integration_qaws($function, $a, $b, $qaws_table, $epsabs, $epsrel, $limit, $workspace) > 773 774=item * C<gsl_integration_qawo($function, $a, $epsabs, $epsrel, $limit, $workspace, $qawo_table) > 775 776=item * C<gsl_integration_qawf($function, $a, $epsabs, $limit, $workspace, $cycle_workspace, $qawo_table) > 777 778=back 779 780This module also includes the following constants : 781 782=over 783 784=item * $GSL_INTEG_COSINE 785 786=item * $GSL_INTEG_SINE 787 788=item * $GSL_INTEG_GAUSS15 789 790=item * $GSL_INTEG_GAUSS21 791 792=item * $GSL_INTEG_GAUSS31 793 794=item * $GSL_INTEG_GAUSS41 795 796=item * $GSL_INTEG_GAUSS51 797 798=item * $GSL_INTEG_GAUSS61 799 800=back 801 802The following error constants are part of the Math::GSL::Errno module and can 803be returned by the gsl_integration_* functions : 804 805=over 806 807=item * $GSL_EMAXITER 808 809Maximum number of subdivisions was exceeded. 810 811=item * $GSL_EROUND 812 813Cannot reach tolerance because of roundoff error, or roundoff error was detected in the extrapolation table. 814 815=item * GSL_ESING 816 817A non-integrable singularity or other bad integrand behavior was found in the integration interval. 818 819=item * GSL_EDIVERGE 820 821The integral is divergent, or too slowly convergent to be integrated numerically. 822 823=back 824 825=head1 MORE INFO 826 827For more informations on the functions, we refer you to the GSL official 828documentation: L<http://www.gnu.org/software/gsl/manual/html_node/> 829 830=head1 AUTHORS 831 832Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com> 833 834=head1 COPYRIGHT AND LICENSE 835 836Copyright (C) 2008-2021 Jonathan "Duke" Leto and Thierry Moisan 837 838This program is free software; you can redistribute it and/or modify it 839under the same terms as Perl itself. 840 841=cut 842 8431; 844