WebCab Optimization
v2.6
(J2EE Edition)

com.webcab.ejb.math.optimization.unidimensional
Class InvalidUniDimensionalFunctionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--com.webcab.ejb.math.optimization.unidimensional.InvalidUniDimensionalFunctionException
All Implemented Interfaces:
Serializable

public class InvalidUniDimensionalFunctionException
extends RuntimeException

This exception is thrown when the user-defined function returns Double.NaN. This restriction applies to all the algorithms except Nelder-Mead and simulated annealing. However it is advisable for you to always make sure that the function does not return invalid values.

See Also:
Serialized Form

Constructor Summary
InvalidUniDimensionalFunctionException(double value)
          Creates new InvalidUniDimensionalFunctionException
InvalidUniDimensionalFunctionException(double value, double x)
           
 
Method Summary
 double getValue()
           
 double getX()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvalidUniDimensionalFunctionException

public InvalidUniDimensionalFunctionException(double value)
Creates new InvalidUniDimensionalFunctionException


InvalidUniDimensionalFunctionException

public InvalidUniDimensionalFunctionException(double value,
                                              double x)
Method Detail

getValue

public double getValue()
Returns:
the invalid value - if this is not NaN, the exception occured during derivative evaluation

getX

public double getX()
Returns:
the point where the function value is invalid, if the function is unidimensional

WebCab Optimization
v2.6
(J2EE Edition)