Skip to content

Commit

Permalink
change bkr for qrr to avoid undefined variable error (#85)
Browse files Browse the repository at this point in the history
* Fixed undefined variable error [changed `bkr` for `qrr`]
  • Loading branch information
markgpritchard authored Dec 9, 2024
1 parent a622c52 commit ebe8484
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ end
F = qr(X, ColumnNorm())
qrr = count(x -> abs(x) eps(), diag(F.R))
if qrr < size(F, 2)
lin_ind = sort!(F.p[sortperm(F.p)[1:bkr]])
lin_ind = sort!(F.p[sortperm(F.p)[1:qrr]])
X = convert(Matrix{Float64}, X[:,lin_ind])
F = qr(X, ColumnNorm())
else
Expand Down Expand Up @@ -234,7 +234,7 @@ end
F = qr(X, ColumnNorm())
qrr = count(x -> abs(x) eps(), diag(F.R))
if qrr < size(F, 2)
lin_ind = sort!(F.p[sortperm(F.p)[1:bkr]])
lin_ind = sort!(F.p[sortperm(F.p)[1:qrr]])
X = convert(Matrix{Float64}, X[:,lin_ind])
else
lin_ind = collect(1:size(F, 2))
Expand Down

0 comments on commit ebe8484

Please sign in to comment.