Class StochasticNewtonMethod
java.lang.Object
net.finmath.rootfinder.StochasticNewtonMethod
- All Implemented Interfaces:
StochasticRootFinderUsingDerivative
Implementation of Newtons method for maps on random variables.
- Version:
- 1.0
- Author:
- Christian Fries, Stefan Sedlmair
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptiondouble
int
boolean
isDone()
void
setValueAndDerivative
(RandomVariable value, RandomVariable derivative)
-
Constructor Details
-
StochasticNewtonMethod
public StochasticNewtonMethod(RandomVariable guess, StochasticNewtonMethod.MethodForAccuracy method) - Parameters:
guess
-RandomVariable
representing a first guess to start of the Newton Methodmethod
- defines the Method used to gain the accuracy for the Newton Iteration
-
-
Method Details
-
getNextPoint
- Specified by:
getNextPoint
in interfaceStochasticRootFinderUsingDerivative
- Returns:
- Next point for which a value should be set using
setValue
.
-
setValueAndDerivative
- Specified by:
setValueAndDerivative
in interfaceStochasticRootFinderUsingDerivative
- Parameters:
value
- The value corresponding to the point returned by previousgetNextPoint
call.derivative
- The derivative corresponding to the point returned by previousgetNextPoint
call.
-
getNumberOfIterations
public int getNumberOfIterations()- Specified by:
getNumberOfIterations
in interfaceStochasticRootFinderUsingDerivative
- Returns:
- Returns the numberOfIterations.
-
getAccuracy
public double getAccuracy()- Specified by:
getAccuracy
in interfaceStochasticRootFinderUsingDerivative
- Returns:
- Returns the accuracy.
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceStochasticRootFinderUsingDerivative
- Returns:
- Returns true if further improvement is not possible.
-
getBestPoint
- Specified by:
getBestPoint
in interfaceStochasticRootFinderUsingDerivative
- Returns:
- Best point obtained so far
-