Class SafeSvd_FDRM
java.lang.Object
org.ejml.dense.row.decomposition.svd.SafeSvd_FDRM
- All Implemented Interfaces:
- DecompositionInterface<FMatrixRMaj>,- SingularValueDecomposition<FMatrixRMaj>,- SingularValueDecomposition_F32<FMatrixRMaj>
@Generated("org.ejml.dense.row.decomposition.svd.SafeSvd_DDRM")
public class SafeSvd_FDRM
extends Object
implements SingularValueDecomposition_F32<FMatrixRMaj>
Wraps around a 
SingularValueDecomposition and ensures that the input is not modified.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleandecompose(FMatrixRMaj orig) Computes the decomposition of the input matrix.float[]Returns the singular values.getU(@Nullable FMatrixRMaj U, boolean transposed) Returns the orthogonal 'U' matrix.getV(@Nullable FMatrixRMaj V, boolean transposed) Returns the orthogonal 'V' matrix.getW(@Nullable FMatrixRMaj W) Returns a diagonal matrix with the singular values.booleanChecks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.booleanIf true then compact matrices are returned.intThe number of singular values in the matrix.intnumCols()Number of columns in the decomposed matrix.intnumRows()Number of rows in the decomposed matrix.
- 
Constructor Details- 
SafeSvd_FDRM
 
- 
- 
Method Details- 
getSingularValuespublic float[] getSingularValues()Description copied from interface:SingularValueDecomposition_F32Returns the singular values. This is the diagonal elements of the W matrix in the decomposition. Ordering of singular values is not guaranteed..- Specified by:
- getSingularValuesin interface- SingularValueDecomposition_F32<FMatrixRMaj>
- Returns:
- Singular values. Note this array can be longer than the number of singular values. Extra elements have no meaning.
 
- 
numberOfSingularValuespublic int numberOfSingularValues()Description copied from interface:SingularValueDecompositionThe number of singular values in the matrix. This is equal to the length of the smallest side.- Specified by:
- numberOfSingularValuesin interface- SingularValueDecomposition<FMatrixRMaj>
- Returns:
- Number of singular values in the matrix.
 
- 
isCompactpublic boolean isCompact()Description copied from interface:SingularValueDecompositionIf true then compact matrices are returned.- Specified by:
- isCompactin interface- SingularValueDecomposition<FMatrixRMaj>
- Returns:
- true if results use compact notation.
 
- 
getUDescription copied from interface:SingularValueDecompositionReturns the orthogonal 'U' matrix. Internally the SVD algorithm might compute U transposed or it might not. To avoid an unnecessary double transpose the option is provided to select if the transpose is returned. - Specified by:
- getUin interface- SingularValueDecomposition<FMatrixRMaj>
- Parameters:
- U- Optional storage for U. If null a new instance or internally maintained matrix is returned. Modified.
- transposed- If the returned U is transposed.
- Returns:
- An orthogonal matrix.
 
- 
getVDescription copied from interface:SingularValueDecompositionReturns the orthogonal 'V' matrix. Internally the SVD algorithm might compute V transposed or it might not. To avoid an unnecessary double transpose the option is provided to select if the transpose is returned. - Specified by:
- getVin interface- SingularValueDecomposition<FMatrixRMaj>
- Parameters:
- V- Optional storage for v. If null a new instance or internally maintained matrix is returned. Modified.
- transposed- If the returned V is transposed.
- Returns:
- An orthogonal matrix.
 
- 
getWDescription copied from interface:SingularValueDecompositionReturns a diagonal matrix with the singular values. Order of the singular values is not guaranteed.- Specified by:
- getWin interface- SingularValueDecomposition<FMatrixRMaj>
- Parameters:
- W- Optional storage for W. If null a new instance or internally maintained matrix is returned. Modified.
- Returns:
- Diagonal matrix with singular values along the diagonal.
 
- 
numRowspublic int numRows()Description copied from interface:SingularValueDecompositionNumber of rows in the decomposed matrix.- Specified by:
- numRowsin interface- SingularValueDecomposition<FMatrixRMaj>
- Returns:
- Number of rows in the decomposed matrix.
 
- 
numColspublic int numCols()Description copied from interface:SingularValueDecompositionNumber of columns in the decomposed matrix.- Specified by:
- numColsin interface- SingularValueDecomposition<FMatrixRMaj>
- Returns:
- Number of columns in the decomposed matrix.
 
- 
decomposeDescription copied from interface:DecompositionInterfaceComputes the decomposition of the input matrix. Depending on the implementation the input matrix might be stored internally or modified. If it is modified then the functionDecompositionInterface.inputModified()will return true and the matrix should not be modified until the decomposition is no longer needed.- Specified by:
- decomposein interface- DecompositionInterface<FMatrixRMaj>
- Parameters:
- orig- The matrix which is being decomposed. Modification is implementation dependent.
- Returns:
- Returns if it was able to decompose the matrix.
 
- 
inputModifiedpublic boolean inputModified()Description copied from interface:DecompositionInterfaceChecks if the input matrix toDecompositionInterface.decompose(org.ejml.data.Matrix)is modified during the decomposition process.- Specified by:
- inputModifiedin interface- DecompositionInterface<FMatrixRMaj>
- Returns:
- true if the input matrix to decompose() is modified.
 
 
-