From b675ed8daf93eaf154f978893060a0dccb9535dd Mon Sep 17 00:00:00 2001 From: tmigot Date: Tue, 26 Aug 2025 23:43:35 +0000 Subject: [PATCH] :robot: Format .jl files --- src/trust-region/tron-trust-region.jl | 10 ++++++---- src/trust-region/trust-region.jl | 15 +++++++++------ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/trust-region/tron-trust-region.jl b/src/trust-region/tron-trust-region.jl index 49b236c..c70fbc4 100644 --- a/src/trust-region/tron-trust-region.jl +++ b/src/trust-region/tron-trust-region.jl @@ -95,7 +95,8 @@ function aredpred!( slope::T; kwargs..., ) where {T, V} - ared, pred, tr.good_grad = aredpred_common(nlp, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) + ared, pred, tr.good_grad = + aredpred_common(nlp, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) γ = f_trial - f - slope tr.quad_min = γ <= 0 ? tr.increase_factor : max(tr.large_decrease_factor, -slope / γ / 2) return ared, pred @@ -110,7 +111,7 @@ function aredpred!( x_trial::V, step::V, slope::T; - kwargs... + kwargs..., ) where {T, V} Fx = similar(x_trial, nls.nls_meta.nequ) return aredpred!(tr, nls, Fx, f, f_trial, Δm, x_trial, step, slope; kwargs...) @@ -126,9 +127,10 @@ function aredpred!( x_trial::V, step::V, slope::T; - kwargs... + kwargs..., ) where {T, V} - ared, pred, tr.good_grad = aredpred_common(nls, Fx, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) + ared, pred, tr.good_grad = + aredpred_common(nls, Fx, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) γ = f_trial - f - slope tr.quad_min = γ <= 0 ? tr.increase_factor : max(tr.large_decrease_factor, -slope / γ / 2) return ared, pred diff --git a/src/trust-region/trust-region.jl b/src/trust-region/trust-region.jl index e33b95e..78b2f18 100644 --- a/src/trust-region/trust-region.jl +++ b/src/trust-region/trust-region.jl @@ -117,9 +117,10 @@ function aredpred!( x_trial::V, step::V, slope::T; - kwargs... + kwargs..., ) where {T, V} - ared, pred, tr.good_grad = aredpred_common(nlp, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) + ared, pred, tr.good_grad = + aredpred_common(nlp, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) return ared, pred end @@ -132,10 +133,11 @@ function aredpred!( x_trial::V, step::V, slope::T; - kwargs... + kwargs..., ) where {T, V} Fx = similar(x_trial, nls.nls_meta.nequ) - ared, pred, tr.good_grad = aredpred_common(nls, Fx, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) + ared, pred, tr.good_grad = + aredpred_common(nls, Fx, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) return ared, pred end @@ -149,9 +151,10 @@ function aredpred!( x_trial::V, step::V, slope::T; - kwargs... + kwargs..., ) where {T, V} - ared, pred, tr.good_grad = aredpred_common(nls, Fx, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) + ared, pred, tr.good_grad = + aredpred_common(nls, Fx, f, f_trial, Δm, x_trial, step, tr.gt, slope; kwargs...) return ared, pred end