Skip to content

Commit 14a511a

Browse files
remove random vector for rayleigh quotient
1 parent 9517db7 commit 14a511a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/R2N.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ function R2NSolver(
4646
s = similar(x0)
4747
s1 = similar(x0)
4848

49-
v0 = randn(T, length(x0))
50-
v0 ./= norm(v0)
49+
v0 = [(-1.0)^i for i in 0:(reg_nlp.model.meta.nvar-1)]
50+
v0 ./= sqrt(reg_nlp.model.meta.nvar)
5151

5252
has_bnds = any(l_bound .!= T(-Inf)) || any(u_bound .!= T(Inf))
5353
if has_bnds

0 commit comments

Comments
 (0)