Class BinarySearch

  • public class BinarySearch
    extends Object
    solves y = f(x) = 0 by binary search. Only really suitable for monotonic functions as the method will check that the initial values lie on opposite sides of the X=0 axis.
    David Huen
    • Method Detail

      • solve

        public static double solve​(double min,
                                   double max,
                                   double tolerance,
                                   ComputeObject obj)
                            throws BioException
        method that will attempt solving the equation.
        min - lower bound of search space.
        max - upper bound of search space.
        tolerance - change in x required to continue iteration.
        obj - the class of ComputeObject class representing the equation to be solved.