File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ PMQRDecomposition class >> of: matrix [
2121{ #category : #private }
2222PMQRDecomposition >> decompose [
2323
24- "
24+ "
2525The method appears to be using Householder reflection. There is a wiki page
2626that describes the mechanics:
2727https://en.wikipedia.org/wiki/QR_decomposition#Using_Householder_reflections
@@ -32,14 +32,14 @@ https://en.wikipedia.org/wiki/QR_decomposition#Using_Householder_reflections
3232 q := self initialQMatrix.
3333 identityMatrix := PMSymmetricMatrix identity: colSize.
3434 1 to: self numberOfColumns do: [ :col |
35- | columnVectorFromRMatrix |
35+ | columnVectorFromRMatrix householderMatrix |
3636 columnVectorFromRMatrix := r columnVectorAt: col size: colSize.
3737 householderVector := columnVectorFromRMatrix householder.
3838 i := (PMVector zeros: col - 1 ) , (householderVector at: 2 ).
39- q := q
40- *
41- (identityMatrix
42- - ((householderVector at: 1 ) * i tensorProduct: i)) .
39+ householderMatrix := identityMatrix
40+ -
41+ ((householderVector at: 1 ) * i tensorProduct: i).
42+ q := q * householderMatrix .
4343 i := PMMatrix rows:
4444 ((r rows allButFirst: col - 1 ) collect: [ :aRow |
4545 aRow allButFirst: col - 1 ]).
You can’t perform that action at this time.
0 commit comments