class Bidiagonal Divide and Conquer SVD More...
Public Member Functions | |
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 |
void | setSwitchSize (int s) |
~BDCSVD () | |
Public Member Functions inherited from Eigen::SVDBase< BDCSVD< MatrixType_, Options_ > > | |
Index | cols () const |
bool | computeU () const |
bool | computeV () const |
BDCSVD< MatrixType_, Options_ > & | derived () |
const BDCSVD< MatrixType_, Options_ > & | derived () 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 |
Index | rows () 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 |
Public Member Functions inherited from Eigen::SolverBase< Derived > | |
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 |
~SolverBase () | |
Public Member Functions inherited from Eigen::EigenBase< Derived > | |
template<typename Dest > | |
void | addTo (Dest &dst) const |
template<typename Dest > | |
void | applyThisOnTheLeft (Dest &dst) const |
template<typename Dest > | |
void | applyThisOnTheRight (Dest &dst) const |
EIGEN_CONSTEXPR Index | cols () const EIGEN_NOEXCEPT |
Derived & | const_cast_derived () const |
const Derived & | const_derived () const |
Derived & | derived () |
const Derived & | derived () const |
template<typename Dest > | |
void | evalTo (Dest &dst) const |
EIGEN_CONSTEXPR Index | rows () const EIGEN_NOEXCEPT |
EIGEN_CONSTEXPR Index | size () const EIGEN_NOEXCEPT |
template<typename Dest > | |
void | subTo (Dest &dst) const |
Public Attributes | |
int | m_numIters |
Protected Member Functions | |
void | allocate (Index rows, Index cols, unsigned int computationOptions) |
Protected Member Functions inherited from Eigen::SVDBase< BDCSVD< MatrixType_, Options_ > > | |
void | _check_compute_assertions () const |
void | _check_solve_assertion (const Rhs &b) const |
bool | allocate (Index rows, Index cols, unsigned int computationOptions) |
SVDBase () | |
Default Constructor. More... | |
Protected Member Functions inherited from Eigen::SolverBase< Derived > | |
template<bool Transpose_, typename Rhs > | |
void | _check_solve_assertion (const Rhs &b) const |
Protected Attributes | |
internal::UpperBidiagonalization< MatrixX > | bid |
MatrixX | copyWorkspace |
int | m_algoswap |
bool | m_compU |
MatrixXr | m_computed |
bool | m_compV |
bool | m_isTranspose |
MatrixXr | m_naiveU |
MatrixXr | m_naiveV |
Index | m_nRec |
bool | m_useQrDecomp |
ArrayXr | m_workspace |
ArrayXi | m_workspaceI |
HouseholderQR< MatrixX > | qrDecomp |
MatrixX | reducedTriangle |
JacobiSVD< MatrixType, ComputationOptions > | smallSvd |
Protected Attributes inherited from Eigen::SVDBase< BDCSVD< MatrixType_, Options_ > > | |
Index | m_cols |
unsigned int | m_computationOptions |
bool | m_computeFullU |
bool | m_computeFullV |
bool | m_computeThinU |
bool | m_computeThinV |
Index | m_diagSize |
ComputationInfo | m_info |
bool | m_isAllocated |
bool | m_isInitialized |
MatrixUType | m_matrixU |
MatrixVType | m_matrixV |
Index | m_nonzeroSingularValues |
RealScalar | m_prescribedThreshold |
Index | m_rows |
SingularValuesType | m_singularValues |
bool | m_usePrescribedThreshold |
Private Types | |
typedef SVDBase< BDCSVD > | Base |
Private Member Functions | |
BDCSVD & | compute_impl (const MatrixType &matrix, unsigned int computationOptions) |
template<typename SVDType > | |
void | computeBaseCase (SVDType &svd, Index n, Index firstCol, Index firstRowW, Index firstColW, Index shift) |
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) |
Additional Inherited Members | |
Static Public Attributes inherited from Eigen::SVDBase< BDCSVD< MatrixType_, Options_ > > | |
static constexpr bool | ShouldComputeFullU |
static constexpr bool | ShouldComputeFullV |
static constexpr bool | ShouldComputeThinU |
static constexpr bool | ShouldComputeThinV |
class Bidiagonal Divide and Conquer SVD
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.
-fp-model
precise
option. Likewise, the -ffast-math
option of GCC or clang will significantly degrade the accuracy.typedef Ref<ArrayXr> Eigen::BDCSVD< MatrixType_, Options_ >::ArrayRef |
typedef Array<Index,1,Dynamic> Eigen::BDCSVD< MatrixType_, Options_ >::ArrayXi |
typedef Array<RealScalar, Dynamic, 1> Eigen::BDCSVD< MatrixType_, Options_ >::ArrayXr |
|
private |
typedef Base::Index Eigen::BDCSVD< MatrixType_, Options_ >::Index |
typedef Ref<ArrayXi> Eigen::BDCSVD< MatrixType_, Options_ >::IndicesRef |
typedef NumTraits<RealScalar>::Literal Eigen::BDCSVD< MatrixType_, Options_ >::Literal |
typedef MatrixType_ Eigen::BDCSVD< MatrixType_, Options_ >::MatrixType |
typedef Base::MatrixUType Eigen::BDCSVD< MatrixType_, Options_ >::MatrixUType |
typedef Base::MatrixVType Eigen::BDCSVD< MatrixType_, Options_ >::MatrixVType |
typedef Matrix<RealScalar, Dynamic, Dynamic, ColMajor> Eigen::BDCSVD< MatrixType_, Options_ >::MatrixXr |
typedef Base::RealScalar Eigen::BDCSVD< MatrixType_, Options_ >::RealScalar |
typedef Base::Scalar Eigen::BDCSVD< MatrixType_, Options_ >::Scalar |
typedef Base::SingularValuesType Eigen::BDCSVD< MatrixType_, Options_ >::SingularValuesType |
typedef Matrix<RealScalar, Dynamic, 1> Eigen::BDCSVD< MatrixType_, Options_ >::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&).
Definition at line 148 of file BDCSVD.h.
|
inline |
Default Constructor with memory preallocation.
Like the default constructor but with preallocation of the internal data according to the specified problem size and Options template parameter.
Definition at line 157 of file BDCSVD.h.
|
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 unitiaries using both the Options template parameter and the constructor. If possible, prefer using the Options template parameter.
computationOptions | specifification for computing Thin/Full unitaries U/V |
Definition at line 176 of file BDCSVD.h.
|
inline |
Constructor performing the decomposition of given matrix, using the custom options specified with the Options template paramter.
matrix | the matrix to decompose |
Definition at line 186 of file BDCSVD.h.
|
inline |
Constructor performing the decomposition of given matrix using specified options for computing unitaries.
One cannot request unitiaries using both the Options template parameter and the constructor. If possible, prefer using the Options template parameter.
matrix | the matrix to decompose |
computationOptions | specifification for computing Thin/Full unitaries U/V |
|
inline |
|
protected |
Definition at line 287 of file BDCSVD.h.
|
inline |
Definition at line 65 of file EigenBase.h.
|
inline |
Method performing the decomposition of given matrix. Computes Thin/Full unitaries U/V if specified using the Options template parameter or the class constructor.
matrix | the matrix to decompose |
Definition at line 215 of file BDCSVD.h.
|
inline |
Method performing the decomposition of given matrix, as specified by the computationOptions
parameter.
matrix | the matrix to decompose |
computationOptions | specify whether to compute Thin/Full unitaries U/V |
|
private |
Definition at line 327 of file BDCSVD.h.
|
private |
|
private |
Definition at line 849 of file BDCSVD.h.
|
private |
|
private |
Definition at line 702 of file BDCSVD.h.
|
private |
Definition at line 424 of file BDCSVD.h.
|
private |
Definition at line 1296 of file BDCSVD.h.
|
private |
Definition at line 1228 of file BDCSVD.h.
|
private |
Definition at line 1256 of file BDCSVD.h.
|
private |
Definition at line 524 of file BDCSVD.h.
|
private |
Definition at line 1098 of file BDCSVD.h.
|
inline |
Definition at line 62 of file EigenBase.h.
|
staticprivate |
Definition at line 833 of file BDCSVD.h.
|
inline |
|
private |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
int Eigen::BDCSVD< MatrixType_, Options_ >::m_numIters |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |