PDL::GSL::INTEG

PDL::GSL::INTEG is a PDL interface to numerical integration routines in GSL.
Download

PDL::GSL::INTEG Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Andres Jordan
  • Publisher web site:
  • http://search.cpan.org/~csoe/PDL-2.4.3/Lib/GSL/INTERP/gsl_interp.pd

PDL::GSL::INTEG Tags


PDL::GSL::INTEG Description

PDL::GSL::INTEG is a PDL interface to numerical integration routines in GSL. PDL::GSL::INTEG is a PDL interface to numerical integration routines in GSL.This is an interface to the numerical integration package present in the GNU Scientific Library, which is an implementation of QUADPACK.Functions are named gslinteg_{algorithm} where {algorithm} is the QUADPACK naming convention. The available functions are:gslinteg_qng: Non-adaptive Gauss-Kronrod integrationgslinteg_qag: Adaptive integrationgslinteg_qags: Adaptive integration with singularitiesgslinteg_qagp: Adaptive integration with known singular pointsgslinteg_qagi: Adaptive integration on infinite interval of the form (-infty,infty)gslinteg_qagiu: Adaptive integration on infinite interval of the form (a,infty)gslinteg_qagil: Adaptive integration on infinite interval of the form (-infty,b)gslinteg_qawc: Adaptive integration for Cauchy principal valuesgslinteg_qaws: Adaptive integration for singular functionsgslinteg_qawo: Adaptive integration for oscillatory functionsgslinteg_qawf: Adaptive integration for Fourier integralsEach algorithm computes an approximation to the integral, I, of the function f(x)w(x), where w(x) is a weight function (for general integrands w(x)=1). The user provides absolute and relative error bounds (epsabs,epsrel) which specify the following accuracy requirement:|RESULT - I| 'y'} is specified in which case the reason of failure will be printed.You can nest integrals up to 20 levels. If you find yourself in the unlikely situation that you need more, you can change the value of 'max_nested_integrals' in the first line of the file 'FUNC.c' and recompile.Please check the GSL documentation for more information.SYNOPSIS use PDL; use PDL::GSL::INTEG; my $a = 1.2; my $b = 3.7; my $epsrel = 0; my $epsabs = 1e-6; # Non adaptive integration my ($res,$abserr,$ierr,$neval) = gslinteg_qng(&myf,$a,$b,$epsrel,$epsabs); # Warnings on my ($res,$abserr,$ierr,$neval) = gslinteg_qng(&myf,$a,$b,$epsrel,$epsabs,{Warn=>'y'}); # Adaptive integration with warnings on my $limit = 1000; my $key = 5; my ($res,$abserr,$ierr) = gslinteg_qag(&myf,$a,$b,$epsrel, $epsabs,$limit,$key,{Warn=>'y'}); sub myf{ my ($x) = @_; return exp(-$x**2); } Requirements: · Perl


PDL::GSL::INTEG Related Software