Skip to content

Commit c5c102e

Browse files
Inlined a method. Added documentation that provides information on the technique used.
1 parent b1e3218 commit c5c102e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Math-Matrix/PMQRDecomposition.class.st

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff 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 }
2822
PMQRDecomposition >> 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

0 commit comments

Comments
 (0)