Skip to content

Commit fbc7ab2

Browse files
remove random vector for rayleigh quotient
1 parent 2899d4f commit fbc7ab2

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
@@ -48,8 +48,8 @@ function R2NSolver(
4848
s = similar(x0)
4949
s1 = similar(x0)
5050

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

5454
has_bnds = any(l_bound .!= T(-Inf)) || any(u_bound .!= T(Inf))
5555
if has_bnds

0 commit comments

Comments
 (0)