public class QRDecomposition
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description | 
|---|---|
| protected static java.lang.String | ERR_MATRIX_RANK_DEFICIENTWhen a matrix is rank deficient. | 
| private int | mRow and column dimensions. | 
| private int | nRow and column dimensions. | 
| private double[][] | QRArray for internal storage of decomposition. | 
| private double[] | RdiagArray for internal storage of diagonal of R. | 
| private static long | serialVersionUIDSerial version | 
| Constructor and Description | 
|---|
| QRDecomposition(double[][] A)QR Decomposition, computed by Householder reflections. | 
| QRDecomposition(double[][] A,
               int m,
               int n)QR Decomposition, computed by Householder reflections. | 
| Modifier and Type | Method and Description | 
|---|---|
| double[][] | getH()Return the Householder vectors | 
| double[][] | getQ()Generate and return the (economy-sized, m by n) orthogonal factor | 
| double[][] | getR()Return the upper triangular factor | 
| double[][] | inverse()Find the inverse matrix. | 
| boolean | isFullRank()Is the matrix full rank? | 
| int | rank(double t)Get the matrix rank? | 
| double[] | solve(double[] b)Least squares solution of A*X = b | 
| double[][] | solve(double[][] B)Least squares solution of A*X = B | 
| double[] | solveInplace(double[] b)Least squares solution of A*X = b | 
| private double[][] | solveInplace(double[][] B)Least squares solution of A*X = B | 
protected static final java.lang.String ERR_MATRIX_RANK_DEFICIENT
private static final long serialVersionUID
private double[][] QR
private int m
private int n
private double[] Rdiag
public QRDecomposition(double[][] A)
A - Rectangular matrixpublic QRDecomposition(double[][] A,
                       int m,
                       int n)
A - Rectangular matrixm - row dimensionalityn - column dimensionalitypublic boolean isFullRank()
public int rank(double t)
t - Tolerance thresholdpublic double[][] getH()
public double[][] getR()
public double[][] getQ()
public double[][] solve(double[][] B)
B - The matrix B with as many rows as A and any number of columns.java.lang.IllegalArgumentException - Matrix row dimensions must agree.java.lang.ArithmeticException - Matrix is rank deficient.private double[][] solveInplace(double[][] B)
B - The matrix B with as many rows as A and any number of columns (will be overwritten).java.lang.IllegalArgumentException - Matrix row dimensions must agree.java.lang.ArithmeticException - Matrix is rank deficient.public double[] solve(double[] b)
b - A column vector with as many rows as A.java.lang.IllegalArgumentException - Matrix row dimensions must agree.java.lang.ArithmeticException - Matrix is rank deficient.public double[] solveInplace(double[] b)
b - A column vector b with as many rows as A.java.lang.IllegalArgumentException - Matrix row dimensions must agree.java.lang.ArithmeticException - Matrix is rank deficient.public double[][] inverse()
java.lang.ArithmeticException - Matrix is rank deficient.Copyright © 2019 ELKI Development Team. License information.