Skip to content

Commit bc7c95d

Browse files
Moved the declaration closer to the site of the computation.
1 parent 0e2952f commit bc7c95d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Math-Matrix/PMQRDecomposition.class.st

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ that describes the mechanics:
2929
https://en.wikipedia.org/wiki/QR_decomposition#Using_Householder_reflections
3030
"
3131

32-
| identityMatrix householderVector i matrixOfMinor |
33-
identityMatrix := PMSymmetricMatrix identity: colSize.
32+
| i matrixOfMinor |
3433
1 to: self numberOfColumns do: [ :col |
35-
| columnVectorFromRMatrix householderMatrix v |
34+
| householderVector householderMatrix columnVectorFromRMatrix identityMatrix v |
3635
columnVectorFromRMatrix := r columnVectorAt: col size: colSize.
3736
householderVector := columnVectorFromRMatrix householder.
3837
v := (PMVector zeros: col - 1) , (householderVector at: 2).
38+
identityMatrix := PMSymmetricMatrix identity: colSize.
3939
householderMatrix := identityMatrix
4040
-
4141
((householderVector at: 1) * v tensorProduct: v).

0 commit comments

Comments
 (0)