WebCab Optimization
v2.6
(J2SE Edition)

webcab.lib.math.optimization.multidimensional
Class InvalidMultiDimensionalFunctionException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--webcab.lib.math.optimization.multidimensional.InvalidMultiDimensionalFunctionException
All Implemented Interfaces:
Serializable

public class InvalidMultiDimensionalFunctionException
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
InvalidMultiDimensionalFunctionException(double[] nabla, double[] x)
           
InvalidMultiDimensionalFunctionException(double value, double[] x)
           
 
Method Summary
 double getValue()
           
 double[] getValueArray()
           
 double[] getXArray()
           
 
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

InvalidMultiDimensionalFunctionException

public InvalidMultiDimensionalFunctionException(double value,
                                                double[] x)

InvalidMultiDimensionalFunctionException

public InvalidMultiDimensionalFunctionException(double[] nabla,
                                                double[] x)
Method Detail

getValue

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

getXArray

public double[] getXArray()
Returns:
a vector containing the point where the function value is invalid, if the function is multidimensional

getValueArray

public double[] getValueArray()
Returns:
a vector containing the components of the invalid gradient, or null if the error didn't occur during gradient evaluation

WebCab Optimization
v2.6
(J2SE Edition)