File numerics/src/tools/GoldsteinSearch.h#
Go to the source code of this file
Goldstein type search (linesearch and arcsearch), possibly non-monotone.
Implementation of the Goldstein type search. The linesearch version is the most classical one. The arcsearch assumes that the direction of descent is the gradient of the merit function.
Functions
-
double search_Goldstein_standalone(int n, double *theta, double preRHS, search_data *ls_data)#
Goldstein (non-monotone) search, standalone version: it does not compute the reference value, it is expected as argument (theta)
- Parameters:
n – size of the problem
theta – reference value for the acceptance test
preRHS – pre-computed value for the acceptance test
ls_data – necessary data for the search algorithm
- Returns:
the coefficient alpha
-
static inline double linesearch_Goldstein2(int n, double theta, double preRHS, search_data *ls_data)#
Goldstein linesearch; this version compute and update the reference value and calls search_Goldstein_standalone()
- Parameters:
n – size of the problem
theta – current value of the merit function
preRHS – pre-computed value for the acceptance test
ls_data – necessary data for the search algorithm
- Returns:
the coefficient alpha
-
static inline double arcsearch_Goldstein2(int n, double theta, double preRHS, search_data *ls_data)#
Goldstein arcsearch; this version compute and update the reference value and calls search_Goldstein_standalone().
Warning
this function can be used only if the descent direction is the gradient of the merit function.
- Parameters:
n – size of the problem
theta – current value of the merit function
preRHS – pre-computed value for the acceptance test
ls_data – necessary data for the search algorithm
- Returns:
the coefficient alpha
-
void search_Goldstein_params_init(goldstein_extra_params *p)#
Initialize parameters to a default value.
- Parameters:
p – parameters to set
-
struct goldstein_extra_params#
- #include <GoldsteinSearch.h>
Struct to hold together the extra parameters needed by the Goldstein line search.