public abstract class DifferentiableFunction extends Object implements Function
Constructor and Description |
---|
DifferentiableFunction()
Default constructor, automatically sets the internal function for line search
to a
OneDimensionalSubFunction of this DifferentiableFunction . |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
evaluateFunction, getDimensionOfScope
public DifferentiableFunction()
OneDimensionalSubFunction
of this
DifferentiableFunction
.public abstract double[] evaluateGradientOfFunction(double[] x) throws DimensionException, EvaluationException
x
, i.e.,
x
- the current vectorFunction.getDimensionOfScope()
DimensionException
- if dim(x) != n
, with EvaluationException
- if there was something wrong during the evaluation of the
gradientFunction.getDimensionOfScope()
public double[] findOneDimensionalMin(double[] x, double[] d, double alpha_0, double fAlpha_0, double linEps, double startDistance) throws DimensionException, EvaluationException
x
and search in direction
d
, x
- the start pointd
- the search directionalpha_0
- the initial alphafAlpha_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 methodstartDistance
- the initial distance for bracketing the minimumdouble[2] res = { alpha*, f(alpha*) }
DimensionException
- if there is something wrong with the dimensionEvaluationException
- if there was something wrong during the evaluation of the
functionOneDimensionalFunction.findMin(double, double, double, double)