Class NoRootFoundException

  • All Implemented Interfaces:
    Serializable

    public class NoRootFoundException
    extends Exception
    This is the Exception 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 Detail

      • NoRootFoundException

        public NoRootFoundException​(double x,
                                    double fx)
        Construct a NoRootFoundException. This object gives a snapshot/information of the uniroot algorithm before it throws the exception.
        Parameters:
        x - the best approximate root found before throwing exception
        fx - the function value f(x)
    • Method Detail

      • x

        public double x()
        the best approximate root found so far
        Returns:
        a root
      • fx

        public double fx()
        Get f(x).
        Returns:
        f(x)