Package dev.nm.analysis.root.univariate
Class NoRootFoundException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- dev.nm.analysis.root.univariate.NoRootFoundException
-
- All Implemented Interfaces:
Serializable
public class NoRootFoundException extends Exception
This is theException
thrown when it fails to find a root. It may contain some information about the state before it throws the exception. It may be be useful in situations where an (approximate) root is needed at the sacrifice of accuracy.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NoRootFoundException(double x, double fx)
Construct aNoRootFoundException
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
fx()
Get f(x).double
x()
the best approximate root found so far-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
NoRootFoundException
public NoRootFoundException(double x, double fx)
Construct aNoRootFoundException
. This object gives a snapshot/information of the uniroot algorithm before it throws the exception.- Parameters:
x
- the best approximate root found before throwing exceptionfx
- the function value f(x)
-
-