Package rocks.palaiologos.maja.matrix
Class DoubleQRDecompositionResult
java.lang.Object
rocks.palaiologos.maja.matrix.DoubleQRDecompositionResult
The result of QR decomposition.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final DoubleMatrixprivate final intprivate final intprivate final DoubleMatrixprivate final DoubleMatrixprivate final DoubleMatrixprivate final double[] -
Constructor Summary
ConstructorsConstructorDescriptionDoubleQRDecompositionResult(DoubleMatrix q, DoubleMatrix r, DoubleMatrix h, boolean fullrank, int n, int m, DoubleMatrix QR, double[] Rdiag) -
Method Summary
Modifier and TypeMethodDescriptionbooleanfullrank()True if the matrix is full rank.private DoubleMatrixgetMatrix(DoubleMatrix m, int i0, int i1, int j0, int j1) h()The householder matrix; lower trapezoidal matrix whose columns define the reflections.q()The Q matrix.r()The R matrix.Least squares solution of A*X = B.
-
Field Details
-
q
-
r
-
h
-
fullrank
private final boolean fullrank -
n
private final int n -
m
private final int m -
QR
-
Rdiag
private final double[] Rdiag
-
-
Constructor Details
-
DoubleQRDecompositionResult
public DoubleQRDecompositionResult(DoubleMatrix q, DoubleMatrix r, DoubleMatrix h, boolean fullrank, int n, int m, DoubleMatrix QR, double[] Rdiag)
-
-
Method Details
-
getMatrix
-
solve
Least squares solution of A*X = B.- Parameters:
B-- Returns:
- X that minimizes the two norm of Q*R*X-B.
- Throws:
IllegalArgumentException- If matrix row dimensions don't agree or the matrix is rank deficient.
-
q
The Q matrix. -
r
The R matrix. -
h
The householder matrix; lower trapezoidal matrix whose columns define the reflections. -
fullrank
public boolean fullrank()True if the matrix is full rank.
-