template<typename MatrixType_, int Options_>
class Eigen::BDCSVD< MatrixType_, Options_ >
class Bidiagonal Divide and Conquer SVD
- Template Parameters
-
MatrixType_ | the type of the matrix of which we are computing the SVD decomposition |
Options_ | this optional parameter allows one to specify options for computing unitaries U and V. Possible values are ComputeThinU, ComputeThinV, ComputeFullU, ComputeFullV. It is not possible to request both the thin and full version of U or V. By default, unitaries are not computed. |
This class first reduces the input matrix to bi-diagonal form using class UpperBidiagonalization, and then performs a divide-and-conquer diagonalization. Small blocks are diagonalized using class JacobiSVD. You can control the switching size with the setSwitchSize() method, default is 16. For small matrice (<16), it is thus preferable to directly use JacobiSVD. For larger ones, BDCSVD is highly recommended and can several order of magnitude faster.
- Warning
- this algorithm is unlikely to provide accurate result when compiled with unsafe math optimizations. For instance, this concerns Intel's compiler (ICC), which performs such optimization by default unless you compile with the
-fp-model
precise
option. Likewise, the -ffast-math
option of GCC or clang will significantly degrade the accuracy.
- See also
- class JacobiSVD
|
| BDCSVD () |
| Default Constructor. More...
|
|
| BDCSVD (const MatrixType &matrix) |
| Constructor performing the decomposition of given matrix, using the custom options specified with the Options template paramter. More...
|
|
EIGEN_DEPRECATED | BDCSVD (const MatrixType &matrix, unsigned int computationOptions) |
| Constructor performing the decomposition of given matrix using specified options for computing unitaries. More...
|
|
| BDCSVD (Index rows, Index cols) |
| Default Constructor with memory preallocation. More...
|
|
EIGEN_DEPRECATED | BDCSVD (Index rows, Index cols, unsigned int computationOptions) |
| Default Constructor with memory preallocation. More...
|
|
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
BDCSVD & | compute (const MatrixType &matrix) |
| Method performing the decomposition of given matrix. Computes Thin/Full unitaries U/V if specified using the Options template parameter or the class constructor. More...
|
|
EIGEN_DEPRECATED BDCSVD & | compute (const MatrixType &matrix, unsigned int computationOptions) |
| Method performing the decomposition of given matrix, as specified by the computationOptions parameter. More...
|
|
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
bool | computeU () const |
|
bool | computeV () const |
|
ComputationInfo | info () const |
| Reports whether previous computation was successful. More...
|
|
const MatrixUType & | matrixU () const |
|
const MatrixVType & | matrixV () const |
|
Index | nonzeroSingularValues () const |
|
Index | rank () const |
|
BDCSVD< MatrixType_, Options_ > & | setThreshold (const RealScalar &threshold) |
|
BDCSVD< MatrixType_, Options_ > & | setThreshold (Default_t) |
|
const SingularValuesType & | singularValues () const |
|
const Solve< BDCSVD< MatrixType_, Options_ >, Rhs > | solve (const MatrixBase< Rhs > &b) const |
|
RealScalar | threshold () const |
|
const AdjointReturnType | adjoint () const |
|
Derived & | derived () |
|
const Derived & | derived () const |
|
template<typename Rhs > |
const Solve< Derived, Rhs > | solve (const MatrixBase< Rhs > &b) const |
|
| SolverBase () |
|
const ConstTransposeReturnType | transpose () const |
|
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
|
Derived & | derived () |
|
const Derived & | derived () const |
|
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
|
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
|
template<typename MatrixType_ , int Options_>
Default Constructor with memory preallocation.
Like the default constructor but with preallocation of the internal data according to the specified problem size and the computationOptions.
One cannot request unitiaries using both the Options template parameter and the constructor. If possible, prefer using the Options template parameter.
- Parameters
-
computationOptions | specifification for computing Thin/Full unitaries U/V |
- See also
- BDCSVD()
- Deprecated:
- Will be removed in the next major Eigen version. Options should be specified in the Options template parameter.