mikera.matrixx.decompose.impl.qr
Class HouseholderColQR
- java.lang.Object
-
- mikera.matrixx.decompose.impl.qr.HouseholderColQR
-
- All Implemented Interfaces:
- QRDecomposition
public class HouseholderColQR extends java.lang.Object implements QRDecomposition
Householder QR decomposition is rich in operations along the columns of the matrix. This can be taken advantage of by solving for the Q matrix in a column major format to reduce the number of CPU cache misses and the number of copies that are performed.
-
-
Constructor Summary
Constructors Constructor and Description HouseholderColQR(boolean compact)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description QRResultdecompose(AMatrix A)To decompose the matrix 'A' it must have full rank.double[]getGammas()AMatrixgetQ()double[][]getQR()Returns the combined QR matrix in a 2D array format that is column major.AMatrixgetR()
-
-
-
Method Detail
-
getQR
public double[][] getQR()
Returns the combined QR matrix in a 2D array format that is column major.- Returns:
- The QR matrix in a 2D matrix column major format. [ column ][ row ]
-
getQ
public AMatrix getQ()
- Returns:
- The Q matrix from the decomposition.
-
getR
public AMatrix getR()
- Returns:
- The R matrix from the decomposition.
-
decompose
public QRResult decompose(AMatrix A)
To decompose the matrix 'A' it must have full rank. 'A' is a 'm' by 'n' matrix. It requires about 2n*m2-2m2/3 flops.
The matrix provided here can be of different dimension than the one specified in the constructor. It just has to be smaller than or equal to it.
- Specified by:
decomposein interfaceQRDecomposition
-
getGammas
public double[] getGammas()
-
-
DMelt 3.0 © DataMelt by jWork.ORG