de.jstacs.algorithms.optimization
Class OneDimensionalSubFunction
java.lang.Object
de.jstacs.algorithms.optimization.OneDimensionalFunction
de.jstacs.algorithms.optimization.OneDimensionalSubFunction
- All Implemented Interfaces:
- Function
public class OneDimensionalSubFunction
- extends OneDimensionalFunction
This class is used to do the line search.
- Author:
- Jens Keilwagen
Method Summary |
double |
evaluateFunction(double x)
Evaluates the function at position x . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OneDimensionalSubFunction
public OneDimensionalSubFunction(Function f,
double[] current,
double[] d)
throws DimensionException
- Creates a new
OneDimensionalSubFunction
from a Function
f
for the line search.
- Parameters:
f
- the high dimensional functioncurrent
- the current vectord
- the direction along which the line search will be performed
- Throws:
DimensionException
- if there is something wrong with the dimension of a vector
evaluateFunction
public double evaluateFunction(double x)
throws EvaluationException
- Description copied from class:
OneDimensionalFunction
- Evaluates the function at position
x
.
- Specified by:
evaluateFunction
in class OneDimensionalFunction
- Parameters:
x
- the current position
- Returns:
f(x)
- Throws:
EvaluationException
- if there was a mistake during evaluation of the function