Next: , Previous: Providing the function to minimize, Up: One dimensional Minimization   [Index]


35.5 Iteration

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

Function: int gsl_min_fminimizer_iterate (gsl_min_fminimizer * s)

This function performs a single iteration of the minimizer 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 evaluated to Inf or NaN.

GSL_FAILURE

the algorithm could not improve the current best approximation or bounding interval.

The minimizer maintains a current best estimate of the position of the minimum at all times, and the current interval bounding the minimum. This information can be accessed with the following auxiliary functions,

Function: double gsl_min_fminimizer_x_minimum (const gsl_min_fminimizer * s)

This function returns the current estimate of the position of the minimum for the minimizer s.

Function: double gsl_min_fminimizer_x_upper (const gsl_min_fminimizer * s)
Function: double gsl_min_fminimizer_x_lower (const gsl_min_fminimizer * s)

These functions return the current upper and lower bound of the interval for the minimizer s.

Function: double gsl_min_fminimizer_f_minimum (const gsl_min_fminimizer * s)
Function: double gsl_min_fminimizer_f_upper (const gsl_min_fminimizer * s)
Function: double gsl_min_fminimizer_f_lower (const gsl_min_fminimizer * s)

These functions return the value of the function at the current estimate of the minimum and at the upper and lower bounds of the interval for the minimizer s.