Skip to content

Commit

Permalink
Update dogleg.jl with similar abs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieugomez authored Sep 28, 2023
1 parent 0a758ad commit 4c82c21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/optimizer/dogleg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function optimize!(
axpy!(-one(eTy), fcur, fpredict)
predicted_ssr = sum(abs2, fpredict)

ρ = (ssr - trial_ssr) / (ssr - predicted_ssr)
ρ = (ssr - trial_ssr) / abs(ssr - predicted_ssr)
x_converged, f_converged, g_converged, converged =
assess_convergence(δx, x, maxabs_gr, ssr, trial_ssr, x_tol, f_tol, g_tol)

Expand Down

0 comments on commit 4c82c21

Please sign in to comment.