public interface LineSearch
clone
of the line search
should be used for each new optimization problem.Modifier and Type | Method and Description |
---|---|
LineSearch |
clone()
Returns a clone of the line search object
|
double |
lineSearch(double alpha_max,
Vec x_k,
Vec x_grad,
Vec p_k,
Function f,
FunctionVec fp,
double f_x,
double gradP,
Vec x_alpha_pk,
double[] fxApRet,
Vec grad_x_alpha_pk)
Attempts to find the value of α that minimizes
f(x+α p)
|
double |
lineSearch(double alpha_max,
Vec x_k,
Vec x_grad,
Vec p_k,
Function f,
FunctionVec fp,
double f_x,
double gradP,
Vec x_alpha_pk,
double[] fxApRet,
Vec grad_x_alpha_pk,
ExecutorService ex)
Attempts to find the value of α that minimizes
f(x+α p)
|
boolean |
updatesGrad()
When performing the
linear search
step some line searches may or may not use the gradient information. |
double lineSearch(double alpha_max, Vec x_k, Vec x_grad, Vec p_k, Function f, FunctionVec fp, double f_x, double gradP, Vec x_alpha_pk, double[] fxApRet, Vec grad_x_alpha_pk)
alpha_max
- the maximum value for α to search forx_k
- the initial value to search fromx_grad
- the gradient of ∇ f(xk)p_k
- the direction updatef
- the function to minimize the value of
f(xk + α pk)fp
- the gradient of f, ∇f(x), may be null
depending
upon the linesearch methodf_x
- the value of f(xk), or Double.NaN
if it needs to be computedgradP
- the value of ∇f(xk)Tpk,
or Double.NaN
if it needs to be computedx_alpha_pk
- the location to store the value of
xk + α pkfxApRet
- an array to store the computed result of
f(xk + α pk) in the first index
contain. May be null
and the value will not be returnedgrad_x_alpha_pk
- location to store the value of ∇ f(xkα+pk). May be null
, local storage will be allocated if neededdouble lineSearch(double alpha_max, Vec x_k, Vec x_grad, Vec p_k, Function f, FunctionVec fp, double f_x, double gradP, Vec x_alpha_pk, double[] fxApRet, Vec grad_x_alpha_pk, ExecutorService ex)
alpha_max
- the maximum value for α to search forx_k
- the initial value to search fromx_grad
- the gradient of ∇ f(xk)p_k
- the direction updatef
- the function to minimize the value of
f(xk + α pk)fp
- the gradient of f, ∇f(x), may be null
depending
upon the linesearch methodf_x
- the value of f(xk), or Double.NaN
if it needs to be computedgradP
- the value of ∇f(xk)Tpk,
or Double.NaN
if it needs to be computedx_alpha_pk
- the location to store the value of
xk + α pkfxApRet
- an array to store the computed result of
f(xk + α pk) in the first index
contain. May be null
and the value will not be returnedgrad_x_alpha_pk
- location to store the value of ∇ f(xkα+pk). May be null
, local storage will be allocated if neededex
- the source of threads for parallel computation, or null
to perform serial computationboolean updatesGrad()
linear search
step some line searches may or may not use the gradient information. If
the gradient information is used and updated, this method will return
true
. If not the given vector will be unused and not updated, and
this method will return false
true
if the grad_x_alpha_pk
parameter of
lineSearch will be up-to-date after the call, or false
if the
gradient value will need to be computed after.LineSearch clone()
Copyright © 2017. All rights reserved.