| GNU Scientific Library Reference Manual - Third Edition (v1.12) by M. Galassi, J. Davies, J. Theiler, B. Gough, G. Jungman, P. Alken, M. Booth, F. Rossi Paperback (6"x9"), 592 pages, 60 figures ISBN 0954612078 RRP £24.95 ($39.95) |
32.6 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_root_fsolver_iterate (gsl_root_fsolver * s)
- Function: int gsl_root_fdfsolver_iterate (gsl_root_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
InforNaN. GSL_EZERODIV- the derivative of the function vanished at the iteration point, preventing the algorithm from continuing without a division by zero.
The solver maintains a current best estimate of the root at all times. The bracketing solvers also keep track of the current best interval bounding the root. This information can be accessed with the following auxiliary functions,
- Function: double gsl_root_fsolver_root (const gsl_root_fsolver * s)
- Function: double gsl_root_fdfsolver_root (const gsl_root_fdfsolver * s)
- These functions return the current estimate of the root for the solver s.
- Function: double gsl_root_fsolver_x_lower (const gsl_root_fsolver * s)
- Function: double gsl_root_fsolver_x_upper (const gsl_root_fsolver * s)
- These functions return the current bracketing interval for the solver s.
| ISBN 0954612078 | GNU Scientific Library Reference Manual - Third Edition (v1.12) | See the print edition |