Class NewtonSystemRoot
- java.lang.Object
-
- dev.nm.analysis.root.multivariate.NewtonSystemRoot
-
public class NewtonSystemRoot extends Object
This class solves the root for a non-linear system of equations. The procedure is the following.- choose an initial guess for the root of the system
- evaluate the Jacobian at the current best solution, x_old
- solve the linear system J(x_old)Z = -f(x_old), where Z = x_new - x_old
- obtain x_new by using x_new = x_old + Z
- repeat until either it converges or the maximum number of iterations is reached
- return the best solution thus far
- See Also:
- "Butt, R., 'p. 790 - 799', Applied Linear Algebra and Optimization Using MATLAB"
-
-
Constructor Summary
Constructors Constructor Description NewtonSystemRoot(double accuracy, int maxIter)
Constructs an instance of Newton's root finding algorithm for a system of non-linear equations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector
solve(RealScalarFunction[] f, Vector guess)
Searches for a root, x such that f(x) = 0.Vector
solve(RealVectorFunction f, Vector guess)
Searches for a root, x such that f(x) = 0.
-
-
-
Method Detail
-
solve
public Vector solve(RealVectorFunction f, Vector guess) throws NoRootFoundException
Searches for a root, x such that f(x) = 0.- Parameters:
f
- a multivariate functionguess
- an initial guess of the root- Returns:
- an approximate root
- Throws:
NoRootFoundException
- when the search fails to find a root
-
solve
public Vector solve(RealScalarFunction[] f, Vector guess) throws NoRootFoundException
Searches for a root, x such that f(x) = 0.- Parameters:
f
- a system of equationsguess
- an initial guess of the root- Returns:
- an approximate root
- Throws:
NoRootFoundException
- when the search fails to find a root
-
-