Program listing for file numerics/src/tools/GoldsteinSearch.h#
Return to documentation for this file
1#ifndef GOLDSTEINSEARCH_H
2#define GOLDSTEINSEARCH_H
3
4
5
6#include "SiconosConfig.h"
7#include <stddef.h>
8#include "line_search.h"
9
10
11typedef struct {
12 size_t iter_max;
13 double c;
14 double alpha_max;
15} goldstein_extra_params;
16
17#if defined(__cplusplus) && !defined(BUILD_AS_CPP)
18extern "C"
19{
20#endif
21
22
23 double search_Goldstein_standalone(int n, double* theta, double preRHS, search_data* ls_data);
24
25
26 static inline double linesearch_Goldstein2(int n, double theta, double preRHS, search_data* ls_data)
27 {
28 return line_search_generic(n, theta, preRHS, ls_data, LINESEARCH, &search_Goldstein_standalone);
29 }
30
31
32 static inline double arcsearch_Goldstein2(int n, double theta, double preRHS, search_data* ls_data)
33 {
34 return line_search_generic(n, theta, preRHS, ls_data, ARCSEARCH, &search_Goldstein_standalone);
35 }
36
37
38 void search_Goldstein_params_init(goldstein_extra_params* p);
39
40#if defined(__cplusplus) && !defined(BUILD_AS_CPP)
41}
42#endif
43
44#endif