org.jcurl.math
Class BisectionSolver

Package class diagram package BisectionSolver
java.lang.Object
  extended by org.jcurl.math.BisectionSolver

public class BisectionSolver
extends Object

Bisection root-finding algorithm.

Version:
$Id$
Author:
M. Rohrmoser

Constructor Summary
BisectionSolver()
           
 
Method Summary
static double findRoot(R1R1Function f, double y, double left, double right, double epsilon)
          Bisection root-finding algorithm.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BisectionSolver

public BisectionSolver()
Method Detail

findRoot

public static double findRoot(R1R1Function f,
                              double y,
                              double left,
                              double right,
                              double epsilon)
Bisection root-finding algorithm. Ported from http://en.wikipedia.org/wiki/Bisection_method

Parameters:
f - the function to test
y - y value to find x for. 0 finds the root.
left - lower end of the interval to scan
right - upper end of the interval to scan
epsilon - iteration stops when Math.abs(right - left) <= epsilon


Copyright © 2005-2009 jcurl.org. All Rights Reserved.