net.finmath.rootfinder
Class RiddersMethod
- java.lang.Object
-
- net.finmath.rootfinder.RiddersMethod
-
- All Implemented Interfaces:
- RootFinder
public class RiddersMethod extends java.lang.Object implements RootFinder
This class implements Ridders root finder as a question-and-answer algorithm. The method is documented in Numerical Receipts in C.
-
-
Constructor Summary
Constructors Constructor and Description RiddersMethod(double leftPoint, double rightPoint)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetAccuracy()doublegetBestPoint()doublegetNextPoint()intgetNumberOfIterations()booleanisDone()static voidmain(java.lang.String[] args)voidsetValue(double value)
-
-
-
Constructor Detail
-
RiddersMethod
public RiddersMethod(double leftPoint, double rightPoint)- Parameters:
leftPoint- left point of search intervalrightPoint- right point of search interval
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
-
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.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG