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.
return_code::NewtonReturnCode.codes: The return code of computation.NewtonReturnCode.convergedmeans 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::Float64Estimate of the (relative) lost digits in the linear algebra.
NewtonReturnCode.codesThe possible return codes of Newton's method
NewtonReturnCode.convergedNewtonReturnCode.terminatedNewtonReturnCode.terminated_no_approximateNewtonReturnCode.maximal_iterations
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.