de.jstacs.algorithms.optimization
Class NegativeOneDimensionalFunction

java.lang.Object
  extended by de.jstacs.algorithms.optimization.OneDimensionalFunction
      extended by de.jstacs.algorithms.optimization.NegativeOneDimensionalFunction
All Implemented Interfaces:
Function

public class NegativeOneDimensionalFunction
extends OneDimensionalFunction

This class extends the class OneDimensionalFunction. That class is usefull when you want to find a maximum of any one dimensional function. Just use this class an find the minimum of your new function. This minimum has the same abscissa and just a negative ordinate.

Author:
Jens Keilwagen

Constructor Summary
NegativeOneDimensionalFunction(OneDimensionalFunction f)
           
 
Method Summary
 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
 
Methods inherited from class de.jstacs.algorithms.optimization.OneDimensionalFunction
findMin, getDimensionOfScope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NegativeOneDimensionalFunction

public NegativeOneDimensionalFunction(OneDimensionalFunction f)
Parameters:
f - the function
Method Detail

evaluateFunction

public double evaluateFunction(double[] x)
                        throws DimensionException,
                               EvaluationException
Description copied from interface: Function
Evaluates the function at a certain vector (in mathematical sense) x

Specified by:
evaluateFunction in interface Function
Overrides:
evaluateFunction in class OneDimensionalFunction
Parameters:
x - the current vector
Returns:
the elvaluation of the function
Throws:
DimensionException - if dim(x) != n, with f: R^n -> R
EvaluationException - if there was a mistake in evaluating the function

evaluateFunction

public double evaluateFunction(double x)
                        throws EvaluationException
Description copied from class: OneDimensionalFunction
Evaluates the function at position x.

Specified by:
evaluateFunction in class OneDimensionalFunction
Parameters:
x - the current position
Returns:
f(x)
Throws:
EvaluationException - if there was a mistake in evaluating the function