public class NewtonsMethod extends Object implements RootFinderWithDerivative
| Constructor and Description |
|---|
NewtonsMethod(double guess) |
| Modifier and Type | Method and Description |
|---|---|
double |
getAccuracy() |
double |
getBestPoint() |
double |
getNextPoint() |
int |
getNumberOfIterations() |
boolean |
isDone() |
void |
setValueAndDerivative(double value,
double derivative) |
public NewtonsMethod(double guess)
guess - initial guess where the solver will startpublic double getBestPoint()
getBestPoint in interface RootFinderWithDerivativepublic double getNextPoint()
getNextPoint in interface RootFinderWithDerivativesetValue.public void setValueAndDerivative(double value,
double derivative)
setValueAndDerivative in interface RootFinderWithDerivativevalue - The value corresponding to the point returned by previous
getNextPoint call.derivative - The derivative corresponding to the point returned by previous
getNextPoint call.public int getNumberOfIterations()
getNumberOfIterations in interface RootFinderWithDerivativepublic double getAccuracy()
getAccuracy in interface RootFinderWithDerivativepublic boolean isDone()
isDone in interface RootFinderWithDerivativeCopyright © 2015. All rights reserved.