File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -18,22 +18,22 @@ PMQRDecomposition class >> of: matrix [
1818 ^ self new of: matrix
1919]
2020
21- { #category : #private }
22- PMQRDecomposition >> columnVectorFrom: r startingAt: col [
23-
24- ^ r columnVectorAt: col size: colSize .
25- ]
26-
2721{ #category : #private }
2822PMQRDecomposition >> decompose [
2923
24+ "
25+ The method appears to be using Householder reflection. There is a wiki page
26+ that describes the mechanics:
27+ https://en.wikipedia.org/wiki/QR_decomposition#Using_Householder_reflections
28+ "
29+
3030 | identityMatrix q r householderVector i |
3131 r := self initialRMatrix.
3232 q := self initialQMatrix.
3333 identityMatrix := PMSymmetricMatrix identity: colSize.
3434 1 to: self numberOfColumns do: [ :col |
3535 | columnVectorFromRMatrix |
36- columnVectorFromRMatrix := self columnVectorFrom: r startingAt: col .
36+ columnVectorFromRMatrix := r columnVectorAt: col size: colSize .
3737 householderVector := columnVectorFromRMatrix householder.
3838 i := (PMVector zeros: col - 1 ) , (householderVector at: 2 ).
3939 q := q
You can’t perform that action at this time.
0 commit comments