public class SecantMethod extends NewtonsMethod implements RootFinder
Constructor and Description |
---|
SecantMethod(double firstGuess,
double secondGuess) |
Modifier and Type | Method and Description |
---|---|
double |
getNextPoint() |
void |
setValue(double value) |
void |
setValueAndDerivative(double value,
double derivative) |
getAccuracy, getBestPoint, getNumberOfIterations, isDone
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAccuracy, getBestPoint, getNumberOfIterations, isDone
public SecantMethod(double firstGuess, double secondGuess)
firstGuess
- The first guess for the solver to use.secondGuess
- A second guess for the solver to use (different from first guess).public double getNextPoint()
getNextPoint
in interface RootFinder
getNextPoint
in interface RootFinderWithDerivative
getNextPoint
in class NewtonsMethod
setValue
.public void setValue(double value)
setValue
in interface RootFinder
value
- The value corresponding to the point returned
by previous getNextPoint
call.public void setValueAndDerivative(double value, double derivative)
setValueAndDerivative
in interface RootFinderWithDerivative
setValueAndDerivative
in class NewtonsMethod
value
- The value corresponding to the point returned by previous
getNextPoint
call.derivative
- The derivative corresponding to the point returned by previous
getNextPoint
call.Copyright © 2018. All rights reserved.