Class LineSearch
- java.lang.Object
-
- org.apache.commons.math4.legacy.optim.nonlinear.scalar.LineSearch
-
@Deprecated public class LineSearch extends Object
Deprecated.as of 4.0-beta2. Class is now encapsulated inMultivariateOptimizer
. Subclasses should callMultivariateOptimizer.createLineSearch()
andMultivariateOptimizer.lineSearch(double[],double[])
instead.Class for finding the minimum of the objective function along a given direction.- Since:
- 3.3
-
-
Constructor Summary
Constructors Constructor Description LineSearch(MultivariateOptimizer optimizer, double relativeTolerance, double absoluteTolerance, double initialBracketingRange)
Deprecated.TheBrentOptimizer
default stopping criterion uses the tolerances to check the domain (point) values, not the function values.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description UnivariatePointValuePair
search(double[] startPoint, double[] direction)
Deprecated.Finds the numberalpha
that optimizesf(startPoint + alpha * direction)
.
-
-
-
Constructor Detail
-
LineSearch
public LineSearch(MultivariateOptimizer optimizer, double relativeTolerance, double absoluteTolerance, double initialBracketingRange)
Deprecated.TheBrentOptimizer
default stopping criterion uses the tolerances to check the domain (point) values, not the function values. TherelativeTolerance
andabsoluteTolerance
arguments are thus passed to acustom checker
that will use the function values.- Parameters:
optimizer
- Optimizer on behalf of which the line search be performed. Itsobjective function
will be called by thesearch
method.relativeTolerance
- Search will stop when the function relative difference between successive iterations is below this value.absoluteTolerance
- Search will stop when the function absolute difference between successive iterations is below this value.initialBracketingRange
- Extent of the initial interval used to find an interval that brackets the optimum. If the optimized function varies a lot in the vicinity of the optimum, it may be necessary to provide a value lower than the distance between successive local minima.
-
-
Method Detail
-
search
public UnivariatePointValuePair search(double[] startPoint, double[] direction)
Deprecated.Finds the numberalpha
that optimizesf(startPoint + alpha * direction)
.- Parameters:
startPoint
- Starting point.direction
- Search direction.- Returns:
- the optimum.
- Throws:
TooManyEvaluationsException
- if the number of evaluations is exceeded.
-
-