Skip to content

Commit d34e765

Browse files
reformat code in LM & LMTR
1 parent b50c82a commit d34e765

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/LMTR_alg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function LMTR(
132132

133133
σmax, found_σ = opnorm(Jk)
134134
found_σ || error("operator norm computation failed")
135-
νInv = σmax^2/θ # ‖J'J‖ = ‖J‖²
135+
νInv = σmax^2 / θ # ‖J'J‖ = ‖J‖²
136136

137137
mν∇fk = -∇fk / νInv
138138

@@ -255,7 +255,7 @@ function LMTR(
255255
jtprod_residual!(nls, xk, Fk, ∇fk)
256256
σmax, found_σ = opnorm(Jk)
257257
found_σ || error("operator norm computation failed")
258-
νInv = σmax^2/θ # ‖J'J‖ = ‖J‖²
258+
νInv = σmax^2 / θ # ‖J'J‖ = ‖J‖²
259259
@. mν∇fk = -∇fk / νInv
260260
end
261261

src/LM_alg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function LM(
127127

128128
σmax, found_σ = opnorm(Jk)
129129
found_σ || error("operator norm computation failed")
130-
νInv = (σmax^2 + σk)/θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
130+
νInv = (σmax^2 + σk) / θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
131131

132132
s = zero(xk)
133133

@@ -260,7 +260,7 @@ function LM(
260260
if ρk < η1 || ρk == Inf
261261
σk = σk * γ
262262
end
263-
νInv = (σmax^2 + σk)/θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
263+
νInv = (σmax^2 + σk) / θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
264264
tired = k maxIter || elapsed_time > maxTime
265265
end
266266

0 commit comments

Comments
 (0)