Class BisectionSingleRootFinder

  • All Implemented Interfaces:
    SingleRootFinder<Double,​Double>

    public class BisectionSingleRootFinder
    extends RealSingleRootFinder
    Finds a single root of a function using the bisection method.

    If a root of a function $f(x)$ is bounded by two values $x_1$ and $x_2$, then $f(x_1)f(x_2) < 0$. The function is evaluated at the midpoint of these values and the bound that gives the same sign in the function evaluation is replaced. The bisection is stopped when the change in the value of $x$ is below the accuracy, or the evaluation of the function at $x$ is zero.

    • Constructor Detail

      • BisectionSingleRootFinder

        public BisectionSingleRootFinder()
        Creates an instance. Sets the accuracy to 10-15.
      • BisectionSingleRootFinder

        public BisectionSingleRootFinder​(double accuracy)
        Creates an instance.
        Parameters:
        accuracy - The required accuracy of the $x$-position of the root