## Interface NewtonVectorRootFinder

• public interface NewtonVectorRootFinder
Performs Newton-Raphson style multi-dimensional root finding.

This uses the Jacobian matrix as a basis for some parts of the iterative process.

• ### Method Summary

All Methods
Modifier and Type Method Description
static NewtonVectorRootFinder broyden()
Obtains an instance of the Broyden root finder.
static NewtonVectorRootFinder broyden​(double absoluteTol, double relativeTol, int maxSteps)
Obtains an instance of the Broyden root finder specifying the tolerances.
static NewtonVectorRootFinder broyden​(double absoluteTol, double relativeTol, int maxSteps, Decomposition<?> decomposition)
Obtains an instance of the Broyden root finder specifying the tolerances.
DoubleArray findRoot​(java.util.function.Function<DoubleArray,​DoubleArray> function, DoubleArray startPosition)
Finds the root from the specified start position.
DoubleArray findRoot​(java.util.function.Function<DoubleArray,​DoubleArray> function, java.util.function.Function<DoubleArray,​DoubleMatrix> jacobianFunction, DoubleArray startPosition)
Finds the root from the specified start position.
• ### Method Detail

• #### broyden

static NewtonVectorRootFinder broyden()
Obtains an instance of the Broyden root finder.

This uses SV decomposition and standard tolerances.

Returns:
the root finder
• #### broyden

static NewtonVectorRootFinder broyden​(double absoluteTol,
double relativeTol,
int maxSteps)
Obtains an instance of the Broyden root finder specifying the tolerances.

This uses SV decomposition.

Parameters:
absoluteTol - the absolute tolerance
relativeTol - the relative tolerance
maxSteps - the maximum steps
Returns:
the root finder
• #### broyden

static NewtonVectorRootFinder broyden​(double absoluteTol,
double relativeTol,
int maxSteps,
Decomposition<?> decomposition)
Obtains an instance of the Broyden root finder specifying the tolerances.
Parameters:
absoluteTol - the absolute tolerance
relativeTol - the relative tolerance
maxSteps - the maximum steps
decomposition - the decomposition function
Returns:
the root finder
• #### findRoot

DoubleArray findRoot​(java.util.function.Function<DoubleArray,​DoubleArray> function,
DoubleArray startPosition)
Finds the root from the specified start position.

This applies the specified function to find the root. Note if multiple roots exist which one is found will depend on the start position.

Parameters:
function - the vector function
startPosition - the start position of the root finder for
Returns:
the vector root of the collection of functions
Throws:
MathException - if unable to find the root, such as if unable to converge
• #### findRoot

DoubleArray findRoot​(java.util.function.Function<DoubleArray,​DoubleArray> function,
java.util.function.Function<DoubleArray,​DoubleMatrix> jacobianFunction,
DoubleArray startPosition)
Finds the root from the specified start position.

This applies the specified function and Jacobian function to find the root. Note if multiple roots exist which one is found will depend on the start position.

Parameters:
function - the vector function
jacobianFunction - the function to calculate the Jacobian
startPosition - the start position of the root finder for
Returns:
the vector root of the collection of functions
Throws:
MathException - if unable to find the root, such as if unable to converge