Skip to content

Commit 71b4ab3

Browse files
committed
Use UpperTriangular when possible
1 parent 1379f1c commit 71b4ab3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/solve.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
Sa = (Sq[1], Sr[2]) # Size of the original matrix: Q * R
55
Q, R = q.Q, q.R
66
if Sa[1] == Sa[2]
7-
return R \ (Q' * b)
7+
return UpperTriangular(R) \ (Q' * b)
88
elseif Sa[1] > Sa[2]
99
y = Q' * b
10-
R₁ = @view R[SOneTo(Sa[2]), SOneTo(Sa[2])]
10+
R₁ = UpperTriangular(@view R[SOneTo(Sa[2]), SOneTo(Sa[2])])
1111
return R₁ \ y
1212
else
1313
y = Q' * b

0 commit comments

Comments
 (0)