# 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

static 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.
Return
the coefficient alpha
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

static 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()

Return
the coefficient alpha
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

void search_Goldstein_params_init(goldstein_extra_params *p)

Initialize parameters to a default value.

Parameters
• p: parameters to set

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)

Return
the coefficient alpha
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

struct goldstein_extra_params
#include <GoldsteinSearch.h>

Struct to hold together the extra parameters needed by the Goldstein line search.

Public Members

double alpha_max

maximum value of alpha

double c

Value of the slope coefficient.

size_t iter_max

maximum number of iterations