Package org.jblas
Class Decompose
java.lang.Object
org.jblas.Decompose
Matrix which collects all kinds of decompositions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class to hold an LU decomposition result.static class
Class to represent a QR decomposition. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DoubleMatrix
Compute Cholesky decomposition of Astatic FloatMatrix
if (info ) Compute Cholesky decomposition of Alu
(DoubleMatrix A) Compute LU Decomposition of a general matrix.static Decompose.LUDecomposition
<FloatMatrix> lu
(FloatMatrix A) Compute LU Decomposition of a general matrix.qr
(DoubleMatrix A) QR decomposition.static Decompose.QRDecomposition
<FloatMatrix> qr
(FloatMatrix A) QR decomposition.
-
Constructor Details
-
Decompose
public Decompose()
-
-
Method Details
-
lu
Compute LU Decomposition of a general matrix. Computes the LU decomposition using GETRF. Returns three matrices L, U, P, where L is lower diagonal, U is upper diagonal, and P is a permutation matrix such that A = P * L * U.- Parameters:
A
- general matrix- Returns:
- An LUDecomposition object.
-
cholesky
if (info ) Compute Cholesky decomposition of A- Parameters:
A
- symmetric, positive definite matrix (only upper half is used)- Returns:
- upper triangular matrix U such that A = U' * U
-
lu
Compute LU Decomposition of a general matrix. Computes the LU decomposition using GETRF. Returns three matrices L, U, P, where L is lower diagonal, U is upper diagonal, and P is a permutation matrix such that A = P * L * U.- Parameters:
A
- general matrix- Returns:
- An LUDecomposition object.
-
cholesky
Compute Cholesky decomposition of A- Parameters:
A
- symmetric, positive definite matrix (only upper half is used)- Returns:
- upper triangular matrix U such that A = U' * U
-
qr
QR decomposition. Decomposes (m,n) matrix A into a (m,m) matrix Q and an (m,n) matrix R such that Q is orthogonal, R is upper triangular and Q * R = A Note that if A has more rows than columns, then the lower rows of R will contain only zeros, such that the corresponding later columns of Q do not enter the computation at all. For some reason, LAPACK does not properly normalize those columns.- Parameters:
A
- matrix- Returns:
- QR decomposition
-
qr
QR decomposition. Decomposes (m,n) matrix A into a (m,m) matrix Q and an (m,n) matrix R such that Q is orthogonal, R is upper triangular and Q * R = A- Parameters:
A
- matrix- Returns:
- QR decomposition
-