public static class FloatMatrix.QR
extends java.lang.Object
implements java.io.Serializable
The QR decomposition always exists, even if the matrix does not have full rank. The primary use of the QR decomposition is in the least squares solution of non-square systems of simultaneous linear equations.
Modifier and Type | Field and Description |
---|---|
FloatMatrix |
qr
The QR decomposition.
|
float[] |
tau
The scalar factors of the elementary reflectors
|
Constructor and Description |
---|
QR(FloatMatrix qr,
float[] tau)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
FloatMatrix.Cholesky |
CholeskyOfAtA()
Returns the Cholesky decomposition of A'A.
|
FloatMatrix |
Q()
Returns the orthogonal factor.
|
FloatMatrix |
R()
Returns the upper triangular factor.
|
float[] |
solve(float[] b)
Solves the least squares min || B - A*X ||.
|
void |
solve(FloatMatrix B)
Solves the least squares min || B - A*X ||.
|
public final FloatMatrix qr
public final float[] tau
public QR(FloatMatrix qr, float[] tau)
public FloatMatrix.Cholesky CholeskyOfAtA()
public FloatMatrix R()
public FloatMatrix Q()
public float[] solve(float[] b)
b
- the right hand side of overdetermined linear system.java.lang.RuntimeException
- if matrix is rank deficient.public void solve(FloatMatrix B)
B
- the right hand side of overdetermined linear system.
B will be overwritten with the solution matrix on output.java.lang.RuntimeException
- if matrix is rank deficient.