BinarySearch (BioJava-1.5-beta API)
Keywords: org.biojava.utils.math.BinarySearch class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.utils.math
Class BinarySearch

    java.lang.Object
      org.biojava.utils.math.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.

Author:
  David Huen

Constructor Summary
`BinarySearch()`

Method Summary
`static double` | `solve(double min, double max, double tolerance, ComputeObject obj)` method that will attempt solving the equation.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BinarySearch

    public BinarySearch()

Method Detail

### solve

    public static double solve(double min,
                               double max,
                               double tolerance,
                               ComputeObject obj)
                        throws BioException

  method that will attempt solving the equation.

  Parameters:
    `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.
  Throws:
    `BioException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD