Class NonLinearConjugateGradientOptimizer.LineSearchFunction
java.lang.Object
org.apache.commons.math3.optimization.general.NonLinearConjugateGradientOptimizer.LineSearchFunction
- All Implemented Interfaces:
UnivariateFunction
- Enclosing class:
NonLinearConjugateGradientOptimizer
private class NonLinearConjugateGradientOptimizer.LineSearchFunction
extends Object
implements UnivariateFunction
Internal class for line search.
The function represented by this class is the dot product of the objective function gradient and the search direction. Its value is zero when the gradient is orthogonal to the search direction, i.e. when the objective function value is a local extremum along the search direction.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
searchDirection
private final double[] searchDirectionSearch direction.
-
-
Constructor Details
-
LineSearchFunction
LineSearchFunction(double[] searchDirection) Simple constructor.- Parameters:
searchDirection
- search direction
-
-
Method Details
-
value
public double value(double x) Compute the value of the function.- Specified by:
value
in interfaceUnivariateFunction
- Parameters:
x
- Point at which the function value should be computed.- Returns:
- the value of the function.
-