manpagez: man pages & more
info gsl-ref
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

34.4 Iteration

The following functions drive the iteration of each algorithm. Each function performs one iteration to update the state of any solver of the corresponding type. The same functions work for all solvers so that different methods can be substituted at runtime without modifications to the code.

Function: int gsl_multiroot_fsolver_iterate (gsl_multiroot_fsolver * s)
Function: int gsl_multiroot_fdfsolver_iterate (gsl_multiroot_fdfsolver * s)

These functions perform a single iteration of the solver s. If the iteration encounters an unexpected problem then an error code will be returned,

GSL_EBADFUNC

the iteration encountered a singular point where the function or its derivative evaluated to Inf or NaN.

GSL_ENOPROG

the iteration is not making any progress, preventing the algorithm from continuing.

The solver maintains a current best estimate of the root s->x and its function value s->f at all times. This information can be accessed with the following auxiliary functions,

Function: gsl_vector * gsl_multiroot_fsolver_root (const gsl_multiroot_fsolver * s)
Function: gsl_vector * gsl_multiroot_fdfsolver_root (const gsl_multiroot_fdfsolver * s)

These functions return the current estimate of the root for the solver s, given by s->x.

Function: gsl_vector * gsl_multiroot_fsolver_f (const gsl_multiroot_fsolver * s)
Function: gsl_vector * gsl_multiroot_fdfsolver_f (const gsl_multiroot_fdfsolver * s)

These functions return the function value f(x) at the current estimate of the root for the solver s, given by s->f.

Function: gsl_vector * gsl_multiroot_fsolver_dx (const gsl_multiroot_fsolver * s)
Function: gsl_vector * gsl_multiroot_fdfsolver_dx (const gsl_multiroot_fdfsolver * s)

These functions return the last step dx taken by the solver s, given by s->dx.


© manpagez.com 2000-2024
Individual documents may contain additional copyright information.