File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,12 @@ https://en.wikipedia.org/wiki/QR_decomposition#Using_Householder_reflections
4747 * (householderVector at: 2 ) * matrixOfMinor).
4848 matrixOfMinor rowsWithIndexDo: [ :aRow :index |
4949 aRow withIndexDo: [ :element :column |
50+ | rowNumber columnNumber |
51+ rowNumber := col + index - 1 .
52+ columnNumber := col + column - 1 .
5053 r
51- rowAt: col + index - 1
52- columnAt: col + column - 1
54+ rowAt: rowNumber
55+ columnAt: columnNumber
5356 put: ((element closeTo: 0 )
5457 ifTrue: [ 0 ]
5558 ifFalse: [ element ]) ] ] ].
@@ -95,9 +98,12 @@ PMQRDecomposition >> decomposeWithPivot [
9598 * (householderVector at: 2 ) * matrixOfMinor).
9699 matrixOfMinor rowsWithIndexDo: [ :aRow :index |
97100 aRow withIndexDo: [ :element :column |
101+ | rowNumber columnNumber |
102+ rowNumber := rank + index - 1 .
103+ columnNumber := rank + column - 1 .
98104 r
99- rowAt: rank + index - 1
100- columnAt: rank + column - 1
105+ rowAt: rowNumber
106+ columnAt: columnNumber
101107 put: ((element closeTo: 0 )
102108 ifTrue: [ 0 ]
103109 ifFalse: [ element ]) ] ].
You can’t perform that action at this time.
0 commit comments