class Bidiagonal Divide and Conquer SVD More...
#include <ForwardDeclarations.h>
Public Types | |
| enum | { RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, DiagSizeAtCompileTime = EIGEN_SIZE_MIN_PREFER_DYNAMIC(RowsAtCompileTime, ColsAtCompileTime), MaxRowsAtCompileTime = MatrixType::MaxRowsAtCompileTime, MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime, MaxDiagSizeAtCompileTime = EIGEN_SIZE_MIN_PREFER_FIXED(MaxRowsAtCompileTime, MaxColsAtCompileTime), MatrixOptions = MatrixType::Options } |
| typedef Ref< ArrayXr > | ArrayRef |
| typedef Array< Index, 1, Dynamic > | ArrayXi |
| typedef Array< RealScalar, Dynamic, 1 > | ArrayXr |
| typedef Ref< ArrayXi > | IndicesRef |
| typedef NumTraits< RealScalar >::Literal | Literal |
| typedef _MatrixType | MatrixType |
| typedef Base::MatrixUType | MatrixUType |
| typedef Base::MatrixVType | MatrixVType |
| typedef Matrix< Scalar, Dynamic, Dynamic, ColMajor > | MatrixX |
| typedef Matrix< RealScalar, Dynamic, Dynamic, ColMajor > | MatrixXr |
| typedef NumTraits< typename MatrixType::Scalar >::Real | RealScalar |
| typedef MatrixType::Scalar | Scalar |
| typedef Base::SingularValuesType | SingularValuesType |
| typedef Matrix< RealScalar, Dynamic, 1 > | VectorType |
Public Member Functions | |
| BDCSVD () | |
| Default Constructor. More... | |
| BDCSVD (const MatrixType &matrix, unsigned int computationOptions=0) | |
| Constructor performing the decomposition of given matrix. More... | |
| BDCSVD (Index rows, Index cols, unsigned int computationOptions=0) | |
| Default Constructor with memory preallocation. More... | |
| Index | cols () const |
| BDCSVD & | compute (const MatrixType &matrix) |
| Method performing the decomposition of given matrix using current options. More... | |
| BDCSVD & | compute (const MatrixType &matrix, unsigned int computationOptions) |
| Method performing the decomposition of given matrix using custom options. More... | |
| bool | computeU () const |
| bool | computeV () const |
| Index | rows () const |
| void | setSwitchSize (int s) |
| ~BDCSVD () | |
Public Attributes | |
| int | m_numIters |
Protected Attributes | |
| int | m_algoswap |
| bool | m_compU |
| MatrixXr | m_computed |
| bool | m_computeFullU |
| bool | m_computeFullV |
| bool | m_computeThinU |
| bool | m_computeThinV |
| bool | m_compV |
| Index | m_diagSize |
| bool | m_isInitialized |
| bool | m_isTranspose |
| MatrixUType | m_matrixU |
| MatrixVType | m_matrixV |
| MatrixXr | m_naiveU |
| MatrixXr | m_naiveV |
| Index | m_nonzeroSingularValues |
| Index | m_nRec |
| SingularValuesType | m_singularValues |
| ArrayXr | m_workspace |
| ArrayXi | m_workspaceI |
Private Types | |
| typedef SVDBase< BDCSVD > | Base |
Private Member Functions | |
| void | allocate (Index rows, Index cols, unsigned int computationOptions) |
| void | computeSingVals (const ArrayRef &col0, const ArrayRef &diag, const IndicesRef &perm, VectorType &singVals, ArrayRef shifts, ArrayRef mus) |
| void | computeSingVecs (const ArrayRef &zhat, const ArrayRef &diag, const IndicesRef &perm, const VectorType &singVals, const ArrayRef &shifts, const ArrayRef &mus, MatrixXr &U, MatrixXr &V) |
| void | computeSVDofM (Index firstCol, Index n, MatrixXr &U, VectorType &singVals, MatrixXr &V) |
| template<typename HouseholderU , typename HouseholderV , typename NaiveU , typename NaiveV > | |
| void | copyUV (const HouseholderU &householderU, const HouseholderV &householderV, const NaiveU &naiveU, const NaiveV &naivev) |
| void | deflation (Index firstCol, Index lastCol, Index k, Index firstRowW, Index firstColW, Index shift) |
| void | deflation43 (Index firstCol, Index shift, Index i, Index size) |
| void | deflation44 (Index firstColu, Index firstColm, Index firstRowW, Index firstColW, Index i, Index j, Index size) |
| void | divide (Index firstCol, Index lastCol, Index firstRowW, Index firstColW, Index shift) |
| void | perturbCol0 (const ArrayRef &col0, const ArrayRef &diag, const IndicesRef &perm, const VectorType &singVals, const ArrayRef &shifts, const ArrayRef &mus, ArrayRef zhat) |
| void | structured_update (Block< MatrixXr, Dynamic, Dynamic > A, const MatrixXr &B, Index n1) |
Static Private Member Functions | |
| static RealScalar | secularEq (RealScalar x, const ArrayRef &col0, const ArrayRef &diag, const IndicesRef &perm, const ArrayRef &diagShifted, RealScalar shift) |
class Bidiagonal Divide and Conquer SVD
| _MatrixType | the type of the matrix of which we are computing the SVD decomposition |
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.
-fp-model precise option. Likewise, the -ffast-math option of GCC or clang will significantly degrade the accuracy.Definition at line 259 of file ForwardDeclarations.h.
| typedef Ref<ArrayXr> Eigen::BDCSVD::ArrayRef |
| typedef Array<RealScalar, Dynamic, 1> Eigen::BDCSVD::ArrayXr |
|
private |
| typedef Ref<ArrayXi> Eigen::BDCSVD::IndicesRef |
| typedef NumTraits<RealScalar>::Literal Eigen::BDCSVD::Literal |
| typedef _MatrixType Eigen::BDCSVD::MatrixType |
| typedef Matrix<RealScalar, Dynamic, Dynamic, ColMajor> Eigen::BDCSVD::MatrixXr |
| typedef NumTraits<typename MatrixType::Scalar>::Real Eigen::BDCSVD::RealScalar |
| typedef MatrixType::Scalar Eigen::BDCSVD::Scalar |
| typedef Matrix<RealScalar, Dynamic, 1> Eigen::BDCSVD::VectorType |
| anonymous enum |
|
inline |
Default Constructor.
The default constructor is useful in cases in which the user intends to perform decompositions via BDCSVD::compute(const MatrixType&).
|
inline |
Constructor performing the decomposition of given matrix.
| matrix | the matrix to decompose |
| computationOptions | optional parameter allowing to specify if you want full or thin U or V unitaries to be computed. By default, none is computed. This is a bit - field, the possible bits are ComputeFullU, ComputeThinU, ComputeFullV, ComputeThinV. |
Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not available with the (non - default) FullPivHouseholderQR preconditioner.
|
inline |
|
inline |
Method performing the decomposition of given matrix using current options.
| matrix | the matrix to decompose |
This method uses the current computationOptions, as already passed to the constructor or to compute(const MatrixType&, unsigned int).
| BDCSVD< MatrixType > & Eigen::BDCSVD::compute | ( | const MatrixType & | matrix, |
| unsigned int | computationOptions | ||
| ) |
Method performing the decomposition of given matrix using custom options.
| matrix | the matrix to decompose |
| computationOptions | optional parameter allowing to specify if you want full or thin U or V unitaries to be computed. By default, none is computed. This is a bit - field, the possible bits are ComputeFullU, ComputeThinU, ComputeFullV, ComputeThinV. |
Thin unitaries are only available if your matrix type has a Dynamic number of columns (for example MatrixXf). They also are not available with the (non - default) FullPivHouseholderQR preconditioner.
|
private |
|
private |
|
private |
|
inline |
|
inline |
|
private |
|
private |
|
inline |
|
staticprivate |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |