Skip to content

Commit a10d66a

Browse files
reformat code in LM & LMTR
1 parent 527006d commit a10d66a

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
@@ -131,7 +131,7 @@ function LMTR(
131131
Jt_Fk = similar(∇fk) # temporary storage
132132

133133
σmax = opnorm(Jk)
134-
νInv = σmax^2/θ # ‖J'J‖ = ‖J‖²
134+
νInv = σmax^2 / θ # ‖J'J‖ = ‖J‖²
135135

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

@@ -253,7 +253,7 @@ function LMTR(
253253
Jk = jac_op_residual(nls, xk)
254254
jtprod_residual!(nls, xk, Fk, ∇fk)
255255
σmax = opnorm(Jk)
256-
νInv = σmax^2/θ # ‖J'J‖ = ‖J‖²
256+
νInv = σmax^2 / θ # ‖J'J‖ = ‖J‖²
257257
@. mν∇fk = -∇fk / νInv
258258
end
259259

src/LM_alg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function LM(
124124
Jt_Fk = similar(∇fk)
125125

126126
σmax = opnorm(Jk)
127-
νInv = (σmax^2 + σk)/θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
127+
νInv = (σmax^2 + σk) / θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
128128

129129
s = zero(xk)
130130

@@ -251,7 +251,7 @@ function LM(
251251
if ρk < η1 || ρk == Inf
252252
σk = σk * γ
253253
end
254-
νInv = (σmax^2 + σk)/θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
254+
νInv = (σmax^2 + σk) / θ # ‖J'J + σₖ I‖ = ‖J‖² + σₖ
255255
tired = k maxIter || elapsed_time > maxTime
256256
end
257257

0 commit comments

Comments
 (0)