1MROOT(3)              User Contributed Perl Documentation             MROOT(3)
2
3
4

NAME

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

DESCRIPTION

10       This is an interface to the multidimensional root-finding package
11       present in the GNU Scientific Library.
12
13       At the moment there is a single function gslmroot_fsolver which
14       provides an interface to the algorithms in the GSL library that do not
15       use derivatives.
16

SYNOPSIS

18          use PDL;
19          use PDL::GSL::MROOT;
20
21          my $init = pdl (-10.00, -5.0);
22          my $epsabs = 1e-7;
23
24
25         $res = gslmroot_fsolver($init, \&rosenbrock,
26                                 {Method => 0, EpsAbs => $epsabs});
27
28
29         sub rosenbrock{
30            my ($x) = @_;
31            my $c = 1;
32            my $d = 10;
33            my $y = zeroes($x);
34
35            my $y0 = $y->slice(0);
36            $y0 .=  $c * (1 - $x->slice(0));
37
38            my $y1 = $y->slice(1);
39            $y1 .=  $d * ($x->slice(1) - $x->slice(0)**2);
40
41            return $y;
42         }
43       #line 70 "MROOT.pm"
44

FUNCTIONS

46   gslmroot_fsolver
47         Signature: (double [io]xfree(n);   double epsabs(); int method(); SV* function1)
48
49       info not available
50
51       gslmroot_fsolver does not process bad values.  It will set the bad-
52       value flag of all output ndarrays if the flag is set for any of the
53       input ndarrays.
54

SEE ALSO

56       PDL
57
58       The GSL documentation is online at
59
60         http://www.gnu.org/software/gsl/manual/
61

AUTHOR

63       This file copyright (C) 2006 Andres Jordan <ajordan@eso.org> and Simon
64       Casassus <simon@das.uchile.cl> All rights reserved. There is no
65       warranty. You are allowed to redistribute this software/documentation
66       under certain conditions. For details, see the file COPYING in the PDL
67       distribution. If this file is separated from the PDL distribution, the
68       copyright notice should be included in the file.
69
70
71
72perl v5.36.0                      2023-01-20                          MROOT(3)
Impressum