Class BisectionSearch
java.lang.Object
net.finmath.rootfinder.BisectionSearch
- All Implemented Interfaces:
RootFinder
This class implements a Bisection search algorithm,
implemented as a question-and-answer search algorithm.
- Version:
- 1.2
- Author:
- Christian Fries
- Date:
- 2008-03-15
-
Constructor Details
-
BisectionSearch
public BisectionSearch(double leftPoint, double rightPoint) - Parameters:
leftPoint- left point of search intervalrightPoint- right point of search interval
-
-
Method Details
-
getBestPoint
public double getBestPoint()- Specified by:
getBestPointin interfaceRootFinder- Returns:
- Best point optained so far
-
getNextPoint
public double getNextPoint()- Specified by:
getNextPointin interfaceRootFinder- Returns:
- Next point for which a value should be set using
setValue.
-
setValue
public void setValue(double value) - Specified by:
setValuein interfaceRootFinder- Parameters:
value- Value corresponding to point returned by previousgetNextPointcall.
-
getNumberOfIterations
public int getNumberOfIterations()- Specified by:
getNumberOfIterationsin interfaceRootFinder- Returns:
- Returns the numberOfIterations.
-
getAccuracy
public double getAccuracy()- Specified by:
getAccuracyin interfaceRootFinder- Returns:
- Returns the accuracy.
-
isDone
public boolean isDone()- Specified by:
isDonein interfaceRootFinder- Returns:
- Returns the isDone.
-