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 [
18
18
^ self new of: matrix
19
19
]
20
20
21
- { #category : #private }
22
- PMQRDecomposition >> columnVectorFrom: r startingAt: col [
23
-
24
- ^ r columnVectorAt: col size: colSize .
25
- ]
26
-
27
21
{ #category : #private }
28
22
PMQRDecomposition >> decompose [
29
23
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
+
30
30
| identityMatrix q r householderVector i |
31
31
r := self initialRMatrix.
32
32
q := self initialQMatrix.
33
33
identityMatrix := PMSymmetricMatrix identity: colSize.
34
34
1 to: self numberOfColumns do: [ :col |
35
35
| columnVectorFromRMatrix |
36
- columnVectorFromRMatrix := self columnVectorFrom: r startingAt: col .
36
+ columnVectorFromRMatrix := r columnVectorAt: col size: colSize .
37
37
householderVector := columnVectorFromRMatrix householder.
38
38
i := (PMVector zeros: col - 1 ) , (householderVector at: 2 ).
39
39
q := q
You can’t perform that action at this time.
0 commit comments