All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mikera.matrixx.decompose.impl.chol.CholeskyResult Maven / Gradle / Ivy

Go to download

Fast double-precision vector and matrix maths library for Java, supporting N-dimensional numeric arrays.

There is a newer version: 0.67.0
Show newest version
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