|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.jstacs.algorithms.optimization.OneDimensionalFunction
public abstract class OneDimensionalFunction
This class implements the interface Function
for an one-dimensional
function.
Constructor Summary | |
---|---|
OneDimensionalFunction()
|
Method Summary | |
---|---|
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OneDimensionalFunction()
Method Detail |
---|
public double evaluateFunction(double[] x) throws DimensionException, EvaluationException
Function
x
.
evaluateFunction
in interface Function
x
- the current vector
DimensionException
- 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 position
f(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 x
fLower
- the value f(x)
eps
- the threshold to stop the search of the minimumstartDistance
- the initial distance for bracketing the minimum
x
at position 0 and
f(x)
at position 1
EvaluationException
- if there was a mistake during the evaluation of the functionOptimizer
public final int getDimensionOfScope()
Function
Function
.
getDimensionOfScope
in interface Function
n
with
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |