Solves a system of nonlinear equations of several variables using a trust region method. This version requires a last argument of type `TrustRegionWA`
which holds various working arrays. This version of the solver does not instantiate any array. Results of the solver are available in `wa.x` if `info=1`.
"""
function trustregion(f!::Function,j!::Function,x0::Vector{Float64},tolx::Float64,tolf::Float64,maxiter::Int,wa::TrustRegionWA)
function trustregion(f!::Function,j!::Function,x0::Vector{Float64},factor::Float64,tolx::Float64,tolf::Float64,maxiter::Int,wa::TrustRegionWA)
n,iter,info=length(x0),1,0
fnorm,fnorm1=one(Float64),one(Float64)
wa.x.=copy(x0)
...
...
@@ -189,6 +189,7 @@ function trustregion(f!::Function, j!::Function, x0::Vector{Float64}, tolx::Floa