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 RootFinderWithDerivative
public double getNextPoint()
getNextPoint
in interface RootFinderWithDerivative
setValue
.public void setValueAndDerivative(double value, double derivative)
setValueAndDerivative
in interface RootFinderWithDerivative
value
- 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 RootFinderWithDerivative
public double getAccuracy()
getAccuracy
in interface RootFinderWithDerivative
public boolean isDone()
isDone
in interface RootFinderWithDerivative
Copyright © 2015. All rights reserved.