File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -71,22 +71,22 @@ https://en.wikipedia.org/wiki/QR_decomposition#Using_Householder_reflections
7171{ #category : #arithmetic }
7272PMQRDecomposition >> decomposeWithPivot [
7373
74- | identityMatrix householderVector i v vectorOfNormSquareds rank mx pivot matrixOfMinor |
74+ | householderVector i v vectorOfNormSquareds rank mx pivot matrixOfMinor |
7575 vectorOfNormSquareds := matrixToDecompose columnsCollect: [
7676 :columnVector | columnVector * columnVector ].
7777 mx := vectorOfNormSquareds indexOf: vectorOfNormSquareds max.
7878 pivot := Array new : vectorOfNormSquareds size.
7979 rank := 0 .
80- identityMatrix := PMSymmetricMatrix identity: colSize.
8180 [
82- | householderMatrix columnVectorFromRMatrix |
81+ | householderMatrix columnVectorFromRMatrix identityMatrix |
8382 rank := rank + 1 .
8483 pivot at: rank put: mx.
8584 r swapColumn: rank withColumn: mx.
8685 vectorOfNormSquareds swap: rank with: mx.
8786 columnVectorFromRMatrix := r columnVectorAt: rank size: colSize.
8887 householderVector := columnVectorFromRMatrix householder.
8988 v := (PMVector zeros: rank - 1 ) , (householderVector at: 2 ).
89+ identityMatrix := PMSymmetricMatrix identity: colSize.
9090 householderMatrix := identityMatrix
9191 -
9292 ((householderVector at: 1 ) * v tensorProduct: v).
You can’t perform that action at this time.
0 commit comments