public class NegativeOneDimensionalFunction extends OneDimensionalFunction
OneDimensionalFunction. That class is
useful when you want to find a maximum of any one-dimensional function. Just
use this class and find the minimum of your new function. This minimum has
the same abscissa and just a negative ordinate.| Constructor and Description |
|---|
NegativeOneDimensionalFunction(OneDimensionalFunction f)
|
| Modifier and Type | Method and Description |
|---|---|
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. |
findMin, getDimensionOfScopepublic NegativeOneDimensionalFunction(OneDimensionalFunction f)
f - the OneDimensionalFunctionpublic double evaluateFunction(double[] x)
throws DimensionException,
EvaluationException
Functionx.evaluateFunction in interface FunctionevaluateFunction in class OneDimensionalFunctionx - the current vectorDimensionException - if dim(x) != n, with 
EvaluationException - if there was something wrong during the evaluation of the
functionpublic double evaluateFunction(double x)
throws EvaluationException
OneDimensionalFunctionx.evaluateFunction in class OneDimensionalFunctionx - the current positionf(x)EvaluationException - if there was a mistake during evaluation of the function