![]() |
Stan Math Library
5.2.0
Automatic Differentiation
|
|
inlinenoexcept |
Selects a safeguarded trial point for maximizing a scalar function on a line.
The routine assumes a 1-D bracket [x_left, x_right], together with function values and directional derivatives at both endpoints. Internally it:
x(s) = x_left + s * (x_right - x_left), and builds a cubic Hermite model F(s) that matches {f_left, df_left} at s = 0 and {f_right, df_right} at s = 1.The intended use is in line searches for MAXIMIZATION with a "well-formed" bracket satisfying x_left < x_right, df_left > 0, df_right < 0. These sign conditions are not required for safety; they only improve the model.
| Scalar | Floating-point scalar type (float, double, long double). |
| x_left | Left endpoint of the current bracket. |
| f_left | Function value at x_left, i.e. f(x_left). |
| df_left | Directional derivative at x_left with respect to increasing x, i.e. f'(x_left) in the search direction. |
| x_right | Right endpoint of the current bracket. |
| f_right | Function value at x_right, i.e. f(x_right). |
| df_right | Directional derivative at x_right with respect to increasing x, i.e. f'(x_right) in the search direction. |
Definition at line 159 of file wolfe_line_search.hpp.