Class DecompositionFactory_MT_DDRM
public class DecompositionFactory_MT_DDRM
extends java.lang.Object
Contains concurrent implementations of different decompositions.
-
Constructor Summary
Constructors Constructor Description DecompositionFactory_MT_DDRM() -
Method Summary
Modifier and Type Method Description static org.ejml.interfaces.decomposition.CholeskyDecomposition_F64<org.ejml.data.DMatrixRMaj>chol(boolean lower)Returns aCholeskyDecomposition_F64that isn't specialized for any specific matrix size.static org.ejml.interfaces.decomposition.CholeskyDecomposition_F64<org.ejml.data.DMatrixRMaj>chol(int matrixSize, boolean lower)Returns aCholeskyDecomposition_F64that has been optimized for the specified matrix size.static <T extends org.ejml.data.DMatrix>
booleandecomposeSafe(org.ejml.interfaces.decomposition.DecompositionInterface<T> decomp, T M)A simple convinience function that decomposes the matrix but automatically checks the input ti make sure is not being modified.static org.ejml.interfaces.decomposition.EigenDecomposition_F64<org.ejml.data.DMatrixRMaj>eig(boolean needVectors)static org.ejml.interfaces.decomposition.EigenDecomposition_F64<org.ejml.data.DMatrixRMaj>eig(boolean computeVectors, boolean isSymmetric)static org.ejml.interfaces.decomposition.EigenDecomposition_F64<org.ejml.data.DMatrixRMaj>eig(int matrixSize, boolean needVectors)Returns anEigenDecompositionthat has been optimized for the specified matrix size.static org.ejml.interfaces.decomposition.EigenDecomposition_F64<org.ejml.data.DMatrixRMaj>eig(int matrixSize, boolean computeVectors, boolean isSymmetric)Returns anEigenDecompositionwhich is specialized for symmetric matrices or the general problem.static org.ejml.interfaces.decomposition.QRDecomposition<org.ejml.data.DMatrixRMaj>qr()static org.ejml.interfaces.decomposition.QRDecomposition<org.ejml.data.DMatrixRMaj>qr(int numRows, int numCols)Returns aQRDecompositionthat has been optimized for the specified matrix size.static org.ejml.interfaces.decomposition.SingularValueDecomposition_F64<org.ejml.data.DMatrixRMaj>svd(boolean needU, boolean needV, boolean compact)Returns aSingularValueDecompositionthat is NOT optimized for any specified matrix size.static org.ejml.interfaces.decomposition.SingularValueDecomposition_F64<org.ejml.data.DMatrixRMaj>svd(int numRows, int numCols, boolean needU, boolean needV, boolean compact)Returns aSingularValueDecompositionthat has been optimized for the specified matrix size.static org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F64<org.ejml.data.DMatrixRMaj>tridiagonal(int matrixSize)Checks to see if the passed in tridiagonal decomposition is of the appropriate type for the matrix of the provided size.
-
Constructor Details
-
DecompositionFactory_MT_DDRM
public DecompositionFactory_MT_DDRM()
-
-
Method Details
-
chol
public static org.ejml.interfaces.decomposition.CholeskyDecomposition_F64<org.ejml.data.DMatrixRMaj> chol(int matrixSize, boolean lower)Returns a
CholeskyDecomposition_F64that has been optimized for the specified matrix size.- Parameters:
matrixSize- Number of rows and columns that the returned decomposition is optimized for.lower- should a lower or upper triangular matrix be used. If not sure set to true.- Returns:
- A new CholeskyDecomposition.
-
chol
public static org.ejml.interfaces.decomposition.CholeskyDecomposition_F64<org.ejml.data.DMatrixRMaj> chol(boolean lower)Returns aCholeskyDecomposition_F64that isn't specialized for any specific matrix size.- Parameters:
lower- should a lower or upper triangular matrix be used. If not sure set to true.- Returns:
- A new CholeskyDecomposition.
-
svd
public static org.ejml.interfaces.decomposition.SingularValueDecomposition_F64<org.ejml.data.DMatrixRMaj> svd(int numRows, int numCols, boolean needU, boolean needV, boolean compact)Returns a
SingularValueDecompositionthat has been optimized for the specified matrix size. For improved performance only the portion of the decomposition that the user requests will be computed.- Parameters:
numRows- Number of rows the returned decomposition is optimized for.numCols- Number of columns that the returned decomposition is optimized for.needU- Should it compute the U matrix. If not sure set to true.needV- Should it compute the V matrix. If not sure set to true.compact- Should it compute the SVD in compact form. If not sure set to false.- Returns:
- SVD
-
svd
public static org.ejml.interfaces.decomposition.SingularValueDecomposition_F64<org.ejml.data.DMatrixRMaj> svd(boolean needU, boolean needV, boolean compact)Returns aSingularValueDecompositionthat is NOT optimized for any specified matrix size.- Parameters:
needU- Should it compute the U matrix. If not sure set to true.needV- Should it compute the V matrix. If not sure set to true.compact- Should it compute the SVD in compact form. If not sure set to false.- Returns:
- SVD
-
qr
public static org.ejml.interfaces.decomposition.QRDecomposition<org.ejml.data.DMatrixRMaj> qr(int numRows, int numCols)Returns a
QRDecompositionthat has been optimized for the specified matrix size.- Parameters:
numRows- Number of rows the returned decomposition is optimized for.numCols- Number of columns that the returned decomposition is optimized for.- Returns:
- QRDecomposition
-
qr
public static org.ejml.interfaces.decomposition.QRDecomposition<org.ejml.data.DMatrixRMaj> qr() -
eig
public static org.ejml.interfaces.decomposition.EigenDecomposition_F64<org.ejml.data.DMatrixRMaj> eig(int matrixSize, boolean needVectors)Returns an
EigenDecompositionthat has been optimized for the specified matrix size. If the input matrix is symmetric within tolerance then the symmetric algorithm will be used, otherwise a general purpose eigenvalue decomposition is used.- Parameters:
matrixSize- Number of rows and columns that the returned decomposition is optimized for.needVectors- Should eigenvectors be computed or not. If not sure set to true.- Returns:
- A new EigenDecomposition
-
eig
public static org.ejml.interfaces.decomposition.EigenDecomposition_F64<org.ejml.data.DMatrixRMaj> eig(boolean needVectors) -
eig
public static org.ejml.interfaces.decomposition.EigenDecomposition_F64<org.ejml.data.DMatrixRMaj> eig(int matrixSize, boolean computeVectors, boolean isSymmetric)Returns an
EigenDecompositionwhich is specialized for symmetric matrices or the general problem.- Parameters:
matrixSize- Number of rows and columns that the returned decomposition is optimized for.computeVectors- Should it compute the eigenvectors or just eigenvalues.isSymmetric- If true then the returned algorithm is specialized only for symmetric matrices, if false then a general purpose algorithm is returned.- Returns:
- EVD for any matrix.
-
eig
public static org.ejml.interfaces.decomposition.EigenDecomposition_F64<org.ejml.data.DMatrixRMaj> eig(boolean computeVectors, boolean isSymmetric) -
tridiagonal
public static org.ejml.interfaces.decomposition.TridiagonalSimilarDecomposition_F64<org.ejml.data.DMatrixRMaj> tridiagonal(int matrixSize)Checks to see if the passed in tridiagonal decomposition is of the appropriate type for the matrix of the provided size. Returns the same instance or a new instance.- Parameters:
matrixSize- Number of rows and columns that the returned decomposition is optimized for.
-
decomposeSafe
public static <T extends org.ejml.data.DMatrix> boolean decomposeSafe(org.ejml.interfaces.decomposition.DecompositionInterface<T> decomp, T M)A simple convinience function that decomposes the matrix but automatically checks the input ti make sure is not being modified.- Type Parameters:
T- Matrix type.- Parameters:
decomp- Decomposition which is being wrappedM- THe matrix being decomposed.- Returns:
- If the decomposition was successful or not.
-