Skip to content

Commit 88d05d3

Browse files
Apply formatting suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent d57dad8 commit 88d05d3

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/R2N.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ function SolverCore.solve!(
299299
else
300300
λmax = power_method!(solver.subpb.model.B, solver.v0, solver.subpb.model.v, opnorm_maxiter)
301301
end
302-
303302
found_λ || error("operator norm computation failed")
304303

305304
ν₁ = θ / (λmax + σk)
@@ -454,7 +453,6 @@ function SolverCore.solve!(
454453
else
455454
λmax = power_method!(solver.subpb.model.B, solver.v0, solver.subpb.model.v, opnorm_maxiter)
456455
end
457-
458456
found_λ || error("operator norm computation failed")
459457
end
460458

src/utils.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export RegularizedExecutionStats
33
import SolverCore.GenericExecutionStats
44

55
function power_method!(B::M, v₀::S, v₁::S, max_iter::Int = 1) where{M, S}
6-
@assert max_iter >= 1
6+
@assert max_iter >= 1 "max_iter must be at least 1."
77
mul!(v₁, B, v₀)
88
normalize!(v₁) # v1 = B*v0 / ‖B*v0‖
99
for i = 2:max_iter

0 commit comments

Comments
 (0)