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
| Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
InvalidMultiDimensionalFunctionException
public InvalidMultiDimensionalFunctionException(double value,
double[] x)
InvalidMultiDimensionalFunctionException
public InvalidMultiDimensionalFunctionException(double[] nabla,
double[] x)
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