public abstract class OneDimensionalFunction extends Object implements Function
Function for an one-dimensional
function.| Constructor and Description |
|---|
OneDimensionalFunction() |
| Modifier and Type | Method and Description |
|---|---|
abstract double |
evaluateFunction(double x)
Evaluates the function at position
x. |
double |
evaluateFunction(double[] x)
Evaluates the function at a certain vector (in mathematical sense)
x. |
double[] |
findMin(double lower,
double fLower,
double eps,
double startDistance)
This method returns a minimum
x and the value
f(x), starting the search at lower. |
int |
getDimensionOfScope()
Returns the dimension of the scope of the
Function. |
public double evaluateFunction(double[] x)
throws DimensionException,
EvaluationException
Functionx.evaluateFunction in interface Functionx - the current vectorDimensionException - if dim(x) != n, with 
EvaluationException - if there was something wrong during the evaluation of the
functionpublic abstract double evaluateFunction(double x)
throws EvaluationException
x.x - the current positionf(x)EvaluationException - if there was a mistake during evaluation of the functionpublic double[] findMin(double lower,
double fLower,
double eps,
double startDistance)
throws EvaluationException
x and the value
f(x), starting the search at lower. First the
minimum is tried to be bracketed and then the interval is tried to be
reduced.Optimizer.lower - the initial value of xfLower - the value f(x)eps - the threshold to stop the search of the minimumstartDistance - the initial distance for bracketing the minimumx at position 0 and
f(x) at position 1EvaluationException - if there was a mistake during the evaluation of the functionOptimizerpublic final int getDimensionOfScope()
FunctionFunction.getDimensionOfScope in interface Functionn with
