Calculates the singular value decomposition of a matrix, optionally computing the left and right singular vectors.
This function returns the singular value decomposition (SVD) of a
matrix A, optionally computing the left and right singular vectors. It returns the singular values and vectors in a SVD object.
- Note:
- This function requires BLAS/LAPACK functionality and is only available on machines that provide these libraries. Make sure you enable the SCYTHE_LAPACK preprocessor flag if you wish to use this function. Furthermore, note that this function takes and returns only column-major concrete matrices. Future versions of Scythe will provide a native C++ implementation of this function with support for general matrix templates.
- Parameters:
-
A | The matrix to decompose. |
nu | The number of left singular vectors to compute and return. Values less than zero are equivalent to min( , ). |
nv | The number of right singular vectors to compute and return. Values less than zero are equivalent to min( , ). |
- Exceptions:
-
- See also:
- SVD
-
eigen(const Matrix<>& A, bool vectors)
References scythe::Matrix_base< ORDER, STYLE >::cols(), scythe::Matrix< T_type, ORDER, STYLE >::getArray(), scythe::Matrix_base< ORDER, STYLE >::isNull(), min(), scythe::Matrix_base< ORDER, STYLE >::rows(), and SCYTHE_CHECK_10.