Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    PDL::GSL::INTERP 2.4.3

    Download button

    No screenshots available
    Downloads: 1,777  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Andres Jordan | More programs
    Perl Artistic License / FREE
    July 24th, 2007, 18:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    PDL::GSL::INTERP description

    PDL::GSL::INTERP is a PDL interface to Interpolation routines in GSL.

    PDL::GSL::INTERP is a PDL interface to Interpolation routines in GSL.

    SYNOPSIS

    use PDL;
    use PDL::GSL::INTERP;

    my $x = sequence(10);
    my $y = exp($x);

    my $spl = PDL::GSL::INTERP->init('cspline',$x,$y);

    my $res = $spl->eval(4.35);
    $res = $spl->deriv(4.35);
    $res = $spl->deriv2(4.35);
    $res = $spl->integ(2.1,7.4);

    FUNCTIONS

    init()

    The init method initializes a new instance of INTERP. It needs as input an interpolation type and two piddles holding the x and y values to be interpolated. The GSL routines require that x be monotonically increasing and a quicksort is performed by default to ensure that. You can skip the quicksort by passing the option {Sort => 0}.

    The available interpolation types are :

    linear

    polynomial

    cspline (natural cubic spline)
    cspline_periodic (periodic cubic spline)
    akima (natural akima spline)
    akima_periodic (periodic akima spline)

    Please check the GSL documentation for more information.

    Usage:

    $blessed_ref = PDL::GSL::INTERP->init($interp_method,$x,$y,$opt);

    Example:

    $x = sequence(10);
    $y = exp($x);

    $spl = PDL::GSL::INTERP->init('cspline',$x,$y)
    $spl = PDL::GSL::INTERP->init('cspline',$x,$y,{Sort => 1}) #same as above

    # no sorting done on x, user is certain that x is monotonically increasing
    $spl = PDL::GSL::INTERP->init('cspline',$x,$y,{Sort => 0});

    eval()

    The function eval returns the interpolating function at a given point. By default it will barf if you try to extrapolate, to comply silently if the point to be evaluated is out of range pass the option {Extrapolate => 1}

    Usage:

    $result = $spl->eval($points,$opt);

    Example:

    my $res = $spl->eval($x)
    $res = $spl->eval($x,{Extrapolate => 0}) #same as above

    # silently comply if $x is out of range
    $res = $spl->eval($x,{Extrapolate => 1})

    deriv()

    The deriv function returns the derivative of the interpolating function at a given point. By default it will barf if you try to extrapolate, to comply silently if the point to be evaluated is out of range pass the option {Extrapolate => 1}

    Usage:

    $result = $spl->deriv($points,$opt);

    Example:

    my $res = $spl->deriv($x)
    $res = $spl->deriv($x,{Extrapolate => 0}) #same as above

    # silently comply if $x is out of range
    $res = $spl->deriv($x,{Extrapolate => 1})

    deriv2()

    The deriv2 function returns the second derivative of the interpolating function at a given point. By default it will barf if you try to extrapolate, to comply silently if the point to be evaluated is out of range pass the option {Extrapolate => 1}

    Usage:

    $result = $spl->deriv2($points,$opt);

    Example:

    my $res = $spl->deriv2($x)
    $res = $spl->deriv2($x,{Extrapolate => 0}) #same as above

    # silently comply if $x is out of range
    $res = $spl->deriv2($x,{Extrapolate => 1})

    integ()

    The integ function returns the integral of the interpolating function between two points. By default it will barf if you try to extrapolate, to comply silently if one of the integration limits is out of range pass the option {Extrapolate => 1}

    Usage:

    $result = $spl->integ($a,$b,$opt);

    Example:

    my $res = $spl->integ($a,$b)
    $res = $spl->integ($a,$b,{Extrapolate => 0}) #same as above

    # silently comply if $a or $b are out of range
    $res = $spl->eval($a,$b,{Extrapolate => 1})

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    PDL interface | Interpolation routines | Perl module | PDL::GSL::INTERP | PDL | interface

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM