de.jstacs.algorithms.optimization

## Class DifferentiableFunction

• ### Method Summary

All Methods
Modifier and Type Method and Description
abstract double[] evaluateGradientOfFunction(double[] x)
Evaluates the gradient of a function at a certain vector (in mathematical sense) x, i.e., .
double[] findOneDimensionalMin(double[] x, double[] d, double alpha_0, double fAlpha_0, double linEps, double startDistance)
This method is used to find an approximation of an one-dimensional subfunction.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Methods inherited from interface de.jstacs.algorithms.optimization.Function

evaluateFunction, getDimensionOfScope
• ### Method Detail

public abstract double[] evaluateGradientOfFunction(double[] x)
throws DimensionException,
EvaluationException
Evaluates the gradient of a function at a certain vector (in mathematical sense) x, i.e., .
Parameters:
x - the current vector
Returns:
the evaluation of the gradient of a function, has dimension Function.getDimensionOfScope()
Throws:
DimensionException - if dim(x) != n, with
EvaluationException - if there was something wrong during the evaluation of the gradient
Function.getDimensionOfScope()
• #### findOneDimensionalMin

public double[] findOneDimensionalMin(double[] x,
double[] d,
double alpha_0,
double fAlpha_0,
double linEps,
double startDistance)
throws DimensionException,
EvaluationException
This method is used to find an approximation of an one-dimensional subfunction. That means it will find an approximation of the minimum starting at point x and search in direction d,
. This method is a standard implementation. You are enabled to overwrite this method to be faster if you know anything about the problem or if you just want to test other line search methods.
Parameters:
x - the start point
d - the search direction
alpha_0 - the initial alpha
fAlpha_0 - the initial function value (this value is known in most cases and does not have to be computed again)
linEps - the tolerance for stopping this method
startDistance - the initial distance for bracketing the minimum
Returns:
double[2] res = { alpha*, f(alpha*) }
Throws:
DimensionException - if there is something wrong with the dimension
EvaluationException - if there was something wrong during the evaluation of the function
OneDimensionalFunction.findMin(double, double, double, double)