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::Chebyshev; 8use base qw(Exporter); 9use base qw(DynaLoader); 10package Math::GSL::Chebyshevc; 11bootstrap Math::GSL::Chebyshev; 12package Math::GSL::Chebyshev; 13@EXPORT = qw(); 14 15# ---------- BASE METHODS ------------- 16 17package Math::GSL::Chebyshev; 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::Chebyshev; 51 52*gsl_error = *Math::GSL::Chebyshevc::gsl_error; 53*gsl_stream_printf = *Math::GSL::Chebyshevc::gsl_stream_printf; 54*gsl_strerror = *Math::GSL::Chebyshevc::gsl_strerror; 55*gsl_set_error_handler = *Math::GSL::Chebyshevc::gsl_set_error_handler; 56*gsl_set_error_handler_off = *Math::GSL::Chebyshevc::gsl_set_error_handler_off; 57*gsl_set_stream_handler = *Math::GSL::Chebyshevc::gsl_set_stream_handler; 58*gsl_set_stream = *Math::GSL::Chebyshevc::gsl_set_stream; 59*gsl_cheb_alloc = *Math::GSL::Chebyshevc::gsl_cheb_alloc; 60*gsl_cheb_free = *Math::GSL::Chebyshevc::gsl_cheb_free; 61*gsl_cheb_init = *Math::GSL::Chebyshevc::gsl_cheb_init; 62*gsl_cheb_order = *Math::GSL::Chebyshevc::gsl_cheb_order; 63*gsl_cheb_size = *Math::GSL::Chebyshevc::gsl_cheb_size; 64*gsl_cheb_coeffs = *Math::GSL::Chebyshevc::gsl_cheb_coeffs; 65*gsl_cheb_eval = *Math::GSL::Chebyshevc::gsl_cheb_eval; 66*gsl_cheb_eval_err = *Math::GSL::Chebyshevc::gsl_cheb_eval_err; 67*gsl_cheb_eval_n = *Math::GSL::Chebyshevc::gsl_cheb_eval_n; 68*gsl_cheb_eval_n_err = *Math::GSL::Chebyshevc::gsl_cheb_eval_n_err; 69*gsl_cheb_eval_mode = *Math::GSL::Chebyshevc::gsl_cheb_eval_mode; 70*gsl_cheb_eval_mode_e = *Math::GSL::Chebyshevc::gsl_cheb_eval_mode_e; 71*gsl_cheb_calc_deriv = *Math::GSL::Chebyshevc::gsl_cheb_calc_deriv; 72*gsl_cheb_calc_integ = *Math::GSL::Chebyshevc::gsl_cheb_calc_integ; 73 74############# Class : Math::GSL::Chebyshev::gsl_cheb_series_struct ############## 75 76package Math::GSL::Chebyshev::gsl_cheb_series_struct; 77use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 78@ISA = qw( Math::GSL::Chebyshev ); 79%OWNER = (); 80%ITERATORS = (); 81*swig_c_get = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_c_get; 82*swig_c_set = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_c_set; 83*swig_order_get = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_order_get; 84*swig_order_set = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_order_set; 85*swig_a_get = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_a_get; 86*swig_a_set = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_a_set; 87*swig_b_get = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_b_get; 88*swig_b_set = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_b_set; 89*swig_order_sp_get = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_order_sp_get; 90*swig_order_sp_set = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_order_sp_set; 91*swig_f_get = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_f_get; 92*swig_f_set = *Math::GSL::Chebyshevc::gsl_cheb_series_struct_f_set; 93sub new { 94 my $pkg = shift; 95 my $self = Math::GSL::Chebyshevc::new_gsl_cheb_series_struct(@_); 96 bless $self, $pkg if defined($self); 97} 98 99sub DESTROY { 100 return unless $_[0]->isa('HASH'); 101 my $self = tied(%{$_[0]}); 102 return unless defined $self; 103 delete $ITERATORS{$self}; 104 if (exists $OWNER{$self}) { 105 Math::GSL::Chebyshevc::delete_gsl_cheb_series_struct($self); 106 delete $OWNER{$self}; 107 } 108} 109 110sub DISOWN { 111 my $self = shift; 112 my $ptr = tied(%$self); 113 delete $OWNER{$ptr}; 114} 115 116sub ACQUIRE { 117 my $self = shift; 118 my $ptr = tied(%$self); 119 $OWNER{$ptr} = 1; 120} 121 122 123############# Class : Math::GSL::Chebyshev::gsl_function_struct ############## 124 125package Math::GSL::Chebyshev::gsl_function_struct; 126use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 127@ISA = qw( Math::GSL::Chebyshev ); 128%OWNER = (); 129%ITERATORS = (); 130*swig_function_get = *Math::GSL::Chebyshevc::gsl_function_struct_function_get; 131*swig_function_set = *Math::GSL::Chebyshevc::gsl_function_struct_function_set; 132*swig_params_get = *Math::GSL::Chebyshevc::gsl_function_struct_params_get; 133*swig_params_set = *Math::GSL::Chebyshevc::gsl_function_struct_params_set; 134sub new { 135 my $pkg = shift; 136 my $self = Math::GSL::Chebyshevc::new_gsl_function_struct(@_); 137 bless $self, $pkg if defined($self); 138} 139 140sub DESTROY { 141 return unless $_[0]->isa('HASH'); 142 my $self = tied(%{$_[0]}); 143 return unless defined $self; 144 delete $ITERATORS{$self}; 145 if (exists $OWNER{$self}) { 146 Math::GSL::Chebyshevc::delete_gsl_function_struct($self); 147 delete $OWNER{$self}; 148 } 149} 150 151sub DISOWN { 152 my $self = shift; 153 my $ptr = tied(%$self); 154 delete $OWNER{$ptr}; 155} 156 157sub ACQUIRE { 158 my $self = shift; 159 my $ptr = tied(%$self); 160 $OWNER{$ptr} = 1; 161} 162 163 164############# Class : Math::GSL::Chebyshev::gsl_function_fdf_struct ############## 165 166package Math::GSL::Chebyshev::gsl_function_fdf_struct; 167use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 168@ISA = qw( Math::GSL::Chebyshev ); 169%OWNER = (); 170%ITERATORS = (); 171*swig_f_get = *Math::GSL::Chebyshevc::gsl_function_fdf_struct_f_get; 172*swig_f_set = *Math::GSL::Chebyshevc::gsl_function_fdf_struct_f_set; 173*swig_df_get = *Math::GSL::Chebyshevc::gsl_function_fdf_struct_df_get; 174*swig_df_set = *Math::GSL::Chebyshevc::gsl_function_fdf_struct_df_set; 175*swig_fdf_get = *Math::GSL::Chebyshevc::gsl_function_fdf_struct_fdf_get; 176*swig_fdf_set = *Math::GSL::Chebyshevc::gsl_function_fdf_struct_fdf_set; 177*swig_params_get = *Math::GSL::Chebyshevc::gsl_function_fdf_struct_params_get; 178*swig_params_set = *Math::GSL::Chebyshevc::gsl_function_fdf_struct_params_set; 179sub new { 180 my $pkg = shift; 181 my $self = Math::GSL::Chebyshevc::new_gsl_function_fdf_struct(@_); 182 bless $self, $pkg if defined($self); 183} 184 185sub DESTROY { 186 return unless $_[0]->isa('HASH'); 187 my $self = tied(%{$_[0]}); 188 return unless defined $self; 189 delete $ITERATORS{$self}; 190 if (exists $OWNER{$self}) { 191 Math::GSL::Chebyshevc::delete_gsl_function_fdf_struct($self); 192 delete $OWNER{$self}; 193 } 194} 195 196sub DISOWN { 197 my $self = shift; 198 my $ptr = tied(%$self); 199 delete $OWNER{$ptr}; 200} 201 202sub ACQUIRE { 203 my $self = shift; 204 my $ptr = tied(%$self); 205 $OWNER{$ptr} = 1; 206} 207 208 209############# Class : Math::GSL::Chebyshev::gsl_function_vec_struct ############## 210 211package Math::GSL::Chebyshev::gsl_function_vec_struct; 212use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS); 213@ISA = qw( Math::GSL::Chebyshev ); 214%OWNER = (); 215%ITERATORS = (); 216*swig_function_get = *Math::GSL::Chebyshevc::gsl_function_vec_struct_function_get; 217*swig_function_set = *Math::GSL::Chebyshevc::gsl_function_vec_struct_function_set; 218*swig_params_get = *Math::GSL::Chebyshevc::gsl_function_vec_struct_params_get; 219*swig_params_set = *Math::GSL::Chebyshevc::gsl_function_vec_struct_params_set; 220sub new { 221 my $pkg = shift; 222 my $self = Math::GSL::Chebyshevc::new_gsl_function_vec_struct(@_); 223 bless $self, $pkg if defined($self); 224} 225 226sub DESTROY { 227 return unless $_[0]->isa('HASH'); 228 my $self = tied(%{$_[0]}); 229 return unless defined $self; 230 delete $ITERATORS{$self}; 231 if (exists $OWNER{$self}) { 232 Math::GSL::Chebyshevc::delete_gsl_function_vec_struct($self); 233 delete $OWNER{$self}; 234 } 235} 236 237sub DISOWN { 238 my $self = shift; 239 my $ptr = tied(%$self); 240 delete $OWNER{$ptr}; 241} 242 243sub ACQUIRE { 244 my $self = shift; 245 my $ptr = tied(%$self); 246 $OWNER{$ptr} = 1; 247} 248 249 250# ------- VARIABLE STUBS -------- 251 252package Math::GSL::Chebyshev; 253 254*GSL_VERSION = *Math::GSL::Chebyshevc::GSL_VERSION; 255*GSL_MAJOR_VERSION = *Math::GSL::Chebyshevc::GSL_MAJOR_VERSION; 256*GSL_MINOR_VERSION = *Math::GSL::Chebyshevc::GSL_MINOR_VERSION; 257*GSL_POSZERO = *Math::GSL::Chebyshevc::GSL_POSZERO; 258*GSL_NEGZERO = *Math::GSL::Chebyshevc::GSL_NEGZERO; 259*GSL_SUCCESS = *Math::GSL::Chebyshevc::GSL_SUCCESS; 260*GSL_FAILURE = *Math::GSL::Chebyshevc::GSL_FAILURE; 261*GSL_CONTINUE = *Math::GSL::Chebyshevc::GSL_CONTINUE; 262*GSL_EDOM = *Math::GSL::Chebyshevc::GSL_EDOM; 263*GSL_ERANGE = *Math::GSL::Chebyshevc::GSL_ERANGE; 264*GSL_EFAULT = *Math::GSL::Chebyshevc::GSL_EFAULT; 265*GSL_EINVAL = *Math::GSL::Chebyshevc::GSL_EINVAL; 266*GSL_EFAILED = *Math::GSL::Chebyshevc::GSL_EFAILED; 267*GSL_EFACTOR = *Math::GSL::Chebyshevc::GSL_EFACTOR; 268*GSL_ESANITY = *Math::GSL::Chebyshevc::GSL_ESANITY; 269*GSL_ENOMEM = *Math::GSL::Chebyshevc::GSL_ENOMEM; 270*GSL_EBADFUNC = *Math::GSL::Chebyshevc::GSL_EBADFUNC; 271*GSL_ERUNAWAY = *Math::GSL::Chebyshevc::GSL_ERUNAWAY; 272*GSL_EMAXITER = *Math::GSL::Chebyshevc::GSL_EMAXITER; 273*GSL_EZERODIV = *Math::GSL::Chebyshevc::GSL_EZERODIV; 274*GSL_EBADTOL = *Math::GSL::Chebyshevc::GSL_EBADTOL; 275*GSL_ETOL = *Math::GSL::Chebyshevc::GSL_ETOL; 276*GSL_EUNDRFLW = *Math::GSL::Chebyshevc::GSL_EUNDRFLW; 277*GSL_EOVRFLW = *Math::GSL::Chebyshevc::GSL_EOVRFLW; 278*GSL_ELOSS = *Math::GSL::Chebyshevc::GSL_ELOSS; 279*GSL_EROUND = *Math::GSL::Chebyshevc::GSL_EROUND; 280*GSL_EBADLEN = *Math::GSL::Chebyshevc::GSL_EBADLEN; 281*GSL_ENOTSQR = *Math::GSL::Chebyshevc::GSL_ENOTSQR; 282*GSL_ESING = *Math::GSL::Chebyshevc::GSL_ESING; 283*GSL_EDIVERGE = *Math::GSL::Chebyshevc::GSL_EDIVERGE; 284*GSL_EUNSUP = *Math::GSL::Chebyshevc::GSL_EUNSUP; 285*GSL_EUNIMPL = *Math::GSL::Chebyshevc::GSL_EUNIMPL; 286*GSL_ECACHE = *Math::GSL::Chebyshevc::GSL_ECACHE; 287*GSL_ETABLE = *Math::GSL::Chebyshevc::GSL_ETABLE; 288*GSL_ENOPROG = *Math::GSL::Chebyshevc::GSL_ENOPROG; 289*GSL_ENOPROGJ = *Math::GSL::Chebyshevc::GSL_ENOPROGJ; 290*GSL_ETOLF = *Math::GSL::Chebyshevc::GSL_ETOLF; 291*GSL_ETOLX = *Math::GSL::Chebyshevc::GSL_ETOLX; 292*GSL_ETOLG = *Math::GSL::Chebyshevc::GSL_ETOLG; 293*GSL_EOF = *Math::GSL::Chebyshevc::GSL_EOF; 294*M_E = *Math::GSL::Chebyshevc::M_E; 295*M_LOG2E = *Math::GSL::Chebyshevc::M_LOG2E; 296*M_LOG10E = *Math::GSL::Chebyshevc::M_LOG10E; 297*M_SQRT2 = *Math::GSL::Chebyshevc::M_SQRT2; 298*M_SQRT1_2 = *Math::GSL::Chebyshevc::M_SQRT1_2; 299*M_SQRT3 = *Math::GSL::Chebyshevc::M_SQRT3; 300*M_PI = *Math::GSL::Chebyshevc::M_PI; 301*M_PI_2 = *Math::GSL::Chebyshevc::M_PI_2; 302*M_PI_4 = *Math::GSL::Chebyshevc::M_PI_4; 303*M_SQRTPI = *Math::GSL::Chebyshevc::M_SQRTPI; 304*M_2_SQRTPI = *Math::GSL::Chebyshevc::M_2_SQRTPI; 305*M_1_PI = *Math::GSL::Chebyshevc::M_1_PI; 306*M_2_PI = *Math::GSL::Chebyshevc::M_2_PI; 307*M_LN10 = *Math::GSL::Chebyshevc::M_LN10; 308*M_LN2 = *Math::GSL::Chebyshevc::M_LN2; 309*M_LNPI = *Math::GSL::Chebyshevc::M_LNPI; 310*M_EULER = *Math::GSL::Chebyshevc::M_EULER; 311*GSL_PREC_DOUBLE = *Math::GSL::Chebyshevc::GSL_PREC_DOUBLE; 312*GSL_PREC_SINGLE = *Math::GSL::Chebyshevc::GSL_PREC_SINGLE; 313*GSL_PREC_APPROX = *Math::GSL::Chebyshevc::GSL_PREC_APPROX; 314*GSL_MODE_DEFAULT = *Math::GSL::Chebyshevc::GSL_MODE_DEFAULT; 315 316@EXPORT_OK = qw/ 317 gsl_cheb_alloc 318 gsl_cheb_free 319 gsl_cheb_init 320 gsl_cheb_eval 321 gsl_cheb_eval_err 322 gsl_cheb_eval_n 323 gsl_cheb_eval_n_err 324 gsl_cheb_eval_mode 325 gsl_cheb_eval_mode_e 326 gsl_cheb_calc_deriv 327 gsl_cheb_calc_integ 328 /; 329%EXPORT_TAGS = ( all => [ @EXPORT_OK ] ); 330 331__END__ 332 333=encoding utf8 334 335=head1 NAME 336 337Math::GSL::Chebyshev - Univariate Chebyshev Series Approximation 338 339=head1 SYNOPSIS 340 341 use Math::GSL::Chebyshev qw/:all/; 342 343 my $cheb = gsl_cheb_alloc(40); 344 my $function = sub { sin(cos($_[0])) }; 345 346 gsl_cheb_init($cheb, $function, 0, 10); 347 348 my $x = gsl_cheb_eval($cheb, 5.5 ); 349 my ($status,$y,$err) = gsl_cheb_eval_err($cheb, 7.5 ); 350 gsl_cheb_free($cheb); 351 352=head1 DESCRIPTION 353 354=over 355 356=item * C<gsl_cheb_alloc($size)> 357 358 my $cheb = gsl_cheb_alloc(50); 359 360Allocates a new Chebyshev object with $size sample points. 361 362=item * C<gsl_cheb_free($cheb)> 363 364Deallocates memory associated to $cheb. Returns void. 365 366=item * C<gsl_cheb_init($cheb,$function, $lower, $upper)> 367 368 gsl_cheb_init($cheb, sub { sin(cos($_[0])) }, 0, 10 ); 369 370Initiate a Chebyshev object with a function and upper and lower bounds. 371Returns void. 372 373=item * C<gsl_cheb_eval($function, $value)> 374 375 my $evaluated = gsl_cheb_eval($cheb, 5 ); 376 377Returns a Perl scalar of the Chebyshev object $cheb evaluated at $value. 378 379=item * C<gsl_cheb_eval_err($cheb, $value)> 380 381 my ($status,$evaluated,$err) = gsl_cheb_eval($cheb, 5 ); 382 383Returns a list consisting of a GSL status code, the evaluate value and 384the estimated error of the evaluation. 385 386=item * C<gsl_cheb_eval_n > 387 388=item * C<gsl_cheb_eval_n_err > 389 390=item * C<gsl_cheb_eval_mode > 391 392=item * C<gsl_cheb_eval_mode_e > 393 394=item * C<gsl_cheb_calc_deriv($deriv,$cheb) > 395 396 my $status = gsl_cheb_calc_deriv( $deriv, $cheb ); 397 398This will calculate the derivative of $cheb and stores it 399in $deriv, which must be pre-allocated. Returns a GSL status code. 400 401=item * C<gsl_cheb_calc_integ($integ,$cheb) > 402 403 my $status = gsl_cheb_calc_integ( $deriv, $cheb ); 404 405This will calculate the derivative of $cheb and stores it 406in $deriv, which must be pre-allocated. Returns a GSL status code. 407 408=back 409 410For more informations on the functions, we refer you to the GSL official 411documentation: L<http://www.gnu.org/software/gsl/manual/html_node/> 412 413=head1 AUTHORS 414 415Jonathan "Duke" Leto <jonathan@leto.net> and Thierry Moisan <thierry.moisan@gmail.com> 416 417=head1 COPYRIGHT AND LICENSE 418 419Copyright (C) 2008-2021 Jonathan "Duke" Leto and Thierry Moisan 420 421This program is free software; you can redistribute it and/or modify it 422under the same terms as Perl itself. 423 424=cut 425 4261; 427