mikera.matrixx.decompose.impl.chol.CholeskyResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vectorz Show documentation
Show all versions of vectorz Show documentation
Fast double-precision vector and matrix maths library for Java, supporting N-dimensional numeric arrays.
package mikera.matrixx.decompose.impl.chol;
import mikera.matrixx.AMatrix;
import mikera.matrixx.decompose.ICholeskyLDUResult;
import mikera.matrixx.impl.ADiagonalMatrix;
import mikera.matrixx.impl.IdentityMatrix;
public class CholeskyResult implements ICholeskyLDUResult {
private final AMatrix L;
private final ADiagonalMatrix D;
private final AMatrix U;
public CholeskyResult(AMatrix L) {
this(L,IdentityMatrix.create(L.rowCount()),L.getTranspose());
}
public CholeskyResult(AMatrix L, ADiagonalMatrix D, AMatrix U) {
this.L = L;
this.D = D;
this.U = U;
}
/**
*
* Returns the lower triangular matrix from the decomposition.
*
* @return A lower triangular matrix.
*/
@Override
public AMatrix getL() {
return L;
}
/**
*
* Returns the upper triangular matrix from the decomposition.
*
* @return An upper triangular matrix.
*/
@Override
public AMatrix getU() {
return U;
}
/**
*
* Returns the diagonal matrix from the decomposition.
*
* @return A diagonal matrix.
*/
@Override
public ADiagonalMatrix getD() {
return D;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy