logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

PDL::GSL::MROOT - PDL interface to multidimensional root-finding routines in GSL

Author

       This file copyright (C) 2006 Andres Jordan <ajordan@eso.org> and Simon Casassus <simon@das.uchile.cl> All
       rights reserved. There is no warranty. You are allowed to redistribute this software/documentation under
       certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated
       from the PDL distribution, the copyright notice should be included in the file.

perl v5.34.0                                       2022-02-08                                         MROOT(3pm)

Description

       This is an interface to the multidimensional root-finding package present in the GNU Scientific Library.

       At the moment there is a single function gslmroot_fsolver which provides an interface to the algorithms
       in the GSL library that do not use derivatives.

Functions

gslmroot_fsolver
         Signature: (double [io]xfree(n);   double epsabs(); int method(); SV* function1)

       info not available

       gslmroot_fsolver does not process bad values.  It will set the bad-value flag of all output ndarrays if
       the flag is set for any of the input ndarrays.

Name

       PDL::GSL::MROOT - PDL interface to multidimensional root-finding routines in GSL

See Also

       PDL

       The GSL documentation is online at

         http://www.gnu.org/software/gsl/manual/

Synopsis

          use PDL;
          use PDL::GSL::MROOT;

          my $init = pdl (-10.00, -5.0);
          my $epsabs = 1e-7;

         $res = gslmroot_fsolver($init, \&rosenbrock,
                                 {Method => 0, EpsAbs => $epsabs});

         sub rosenbrock{
            my ($x) = @_;
            my $c = 1;
            my $d = 10;
            my $y = zeroes($x);

            my $y0 = $y->slice(0);
            $y0 .=  $c * (1 - $x->slice(0));

            my $y1 = $y->slice(1);
            $y1 .=  $d * ($x->slice(1) - $x->slice(0)**2);

            return $y;
         }
       #line 69 "MROOT.pm"

See Also