File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ module RegularizedOptimization
44using LinearAlgebra, Logging, Printf
55
66# external dependencies
7- using ProximalOperators, Arpack
7+ using Arpack, ProximalOperators
88
99# dependencies from us
1010using LinearOperators,
Original file line number Diff line number Diff line change @@ -8,7 +8,6 @@ function opnorm_eig(B; max_attempts::Int = 3)
88 have_eig = false
99 attempt = 0
1010 λ = zero (eltype (B))
11- success = false
1211 n = size (B, 1 )
1312 nev = 1
1413 ncv = max (20 , 2 * nev + 1 )
@@ -18,19 +17,17 @@ function opnorm_eig(B; max_attempts::Int = 3)
1817 have_eig = nconv == 1
1918 if (have_eig)
2019 λ = abs (d[1 ])
21- success = true
2220 else
2321 ncv = min (2 * ncv, n)
2422 end
2523 end
26- return λ, success
24+ return λ, have_eig
2725end
2826
2927function opnorm_svd (J; max_attempts:: Int = 3 )
3028 have_svd = false
3129 attempt = 0
3230 σ = zero (eltype (J))
33- success = false
3431 n = min (size (J)... )
3532 nsv = 1
3633 ncv = 10
@@ -40,12 +37,11 @@ function opnorm_svd(J; max_attempts::Int = 3)
4037 have_svd = nconv == 1
4138 if (have_svd)
4239 σ = maximum (s. S)
43- success = true
4440 else
4541 ncv = min (2 * ncv, n)
4642 end
4743 end
48- return σ, success
44+ return σ, have_svd
4945end
5046
5147ShiftedProximalOperators. iprox! (
You can’t perform that action at this time.
0 commit comments