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, and DisableQRDecomposition. It is not possible to request both the thin and full version of U or V. By default, unitaries are not computed. BDCSVD uses R-Bidiagonalization to improve performance on tall and wide matrices. For backwards compatility, the option DisableQRDecomposition can be used to disable this optimization. |
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.
|
| |
| template<typename Derived> |
| | BDCSVD (const MatrixBase< Derived > &matrix) |
| | Constructor performing the decomposition of given matrix, using the custom options specified with the Options template parameter.
|
| |
| template<typename Derived> |
| | BDCSVD (const MatrixBase< Derived > &matrix, unsigned int computationOptions) |
| | Constructor performing the decomposition of given matrix using specified options for computing unitaries.
|
| |
| | BDCSVD (Index rows, Index cols) |
| | Default Constructor with memory preallocation.
|
| |
| | BDCSVD (Index rows, Index cols, unsigned int computationOptions) |
| | Default Constructor with memory preallocation.
|
| |
| template<typename Derived> |
| BDCSVD & | compute (const MatrixBase< Derived > &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.
|
| |
| template<typename Derived> |
| BDCSVD & | compute (const MatrixBase< Derived > &matrix, unsigned int computationOptions) |
| | Method performing the decomposition of given matrix, as specified by the computationOptions parameter.
|
| |
| bool | computeU () const |
| |
| bool | computeV () const |
| |
| bool | computeU () const |
| |
| bool | computeV () const |
| |
| ComputationInfo | info () const |
| | Reports whether previous computation was successful.
|
| |
| 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 |
| |
| constexpr SVDBase< BDCSVD< MatrixType_, Options_ > > & | derived () |
| |
| constexpr const SVDBase< BDCSVD< MatrixType_, Options_ > > & | derived () const |
| |
| const Solve< SVDBase< BDCSVD< MatrixType_, Options_ > >, Rhs > | solve (const MatrixBase< Rhs > &b) const |
| |
| | SolverBase () |
| |
| const ConstTransposeReturnType | transpose () const |
| |
| constexpr Index | cols () const noexcept |
| |
| constexpr SVDBase< BDCSVD< MatrixType_, Options_ > > & | derived () |
| |
| constexpr const SVDBase< BDCSVD< MatrixType_, Options_ > > & | derived () const |
| |
| constexpr Index | rows () const noexcept |
| |
| constexpr Index | size () const noexcept |
| |
template<typename MatrixType_, int Options_>
| Eigen::BDCSVD< MatrixType_, Options_ >::BDCSVD |
( |
Index | rows, |
|
|
Index | cols, |
|
|
unsigned int | computationOptions ) |
|
inline |
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 unitaries using both the Options template parameter and the constructor. If possible, prefer using the Options template parameter.
- Parameters
-
| rows | number of rows for the input matrix |
| cols | number of columns for the input matrix |
| computationOptions | specification for computing Thin/Full unitaries U/V |
- See also
- BDCSVD()
template<typename MatrixType_, int Options_>
template<typename Derived>
| Eigen::BDCSVD< MatrixType_, Options_ >::BDCSVD |
( |
const MatrixBase< Derived > & | matrix, |
|
|
unsigned int | computationOptions ) |
|
inline |
Constructor performing the decomposition of given matrix using specified options for computing unitaries.
One cannot request unitaries using both the Options template parameter and the constructor. If possible, prefer using the Options template parameter.
- Parameters
-
| matrix | the matrix to decompose |
| computationOptions | specification for computing Thin/Full unitaries U/V |