|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
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 f: R^n -> R
EvaluationException
- if there was a mistake in evaluating the functionpublic abstract double evaluateFunction(double x) throws EvaluationException
x
- the current position
EvaluationException
- if there was a mistake in evaluating the functionpublic double[] findMin(double lower, double fLower, double eps, double startDistance) throws EvaluationException
lower
. First the
minimum is tried to be bracket and than the interval is tried to be reduce.
This method is a standard implementation and can be overrwriten any time. It uses methods from the class
Optimizer.
lower
- the initial value of xfLower
- the value f(x)eps
- the threshold to stop the search of the minimumstartDistance
- the inital distance for bracketing the minimum
EvaluationException
- if there was a mistake in evaluating the functionOptimizer
public final int getDimensionOfScope()
Function
getDimensionOfScope
in interface Function
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |