Newton's method
Sometimes it is necessary to refine obtained solutions. For this we provide an interface to Newton's method.
HomotopyContinuation.newton
— Function.newton(F::AbstractSystem, x₀, norm=euclidean_norm, cache=NewtonCache(F, x₀); tol=1e-6, miniters=1, maxiters=3, simplified_last_step=true)
An ordinary Newton's method. If simplified_last_step
is true
, then for the last iteration the previously Jacobian will be used. This uses an LU-factorization for square systems and a QR-factorization for overdetermined.
NewtonResult{T}
Structure holding information about the outcome of the newton
function. The fields are.
retcode
The return code of the compuation.converged
means thataccuracy ≤ tol
.accuracy::T
|xᵢ-xᵢ₋₁| for i = iters and x₀,x₁,…,xᵢ₋₁,xᵢ are the Newton iterates.iters::Int
The number of iterations used.digits_lost::Float64
Estimate of the (relative) lost digits in the linear algebra.
For high performance applications we also provide an in-place version of Newton's method which avoids any temporary allocations.
HomotopyContinuation.newton!
— Function.newton!(out, F::AbstractSystem, x₀, norm, cache::NewtonCache; tol=1e-6, miniters=1, maxiters=3, simplified_last_step=true)
In-place version of newton
. Needs a NewtonCache
and norm
as input.
HomotopyContinuation.NewtonCache
— Type.NewtonCache(F::AbstractSystem, x)
Cache for the newton
function.