![]() |
Prusa Slicer 2.6.0
|
class Bidiagonal Divide and Conquer SVD More...
#include <src/eigen/Eigen/src/SVD/BDCSVD.h>
Inheritance diagram for Eigen::BDCSVD< _MatrixType >:
Collaboration diagram for Eigen::BDCSVD< _MatrixType >: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 _MatrixType | MatrixType |
| typedef MatrixType::Scalar | Scalar |
| typedef NumTraits< typenameMatrixType::Scalar >::Real | RealScalar |
| typedef NumTraits< RealScalar >::Literal | Literal |
| typedef Base::MatrixUType | MatrixUType |
| typedef Base::MatrixVType | MatrixVType |
| typedef Base::SingularValuesType | SingularValuesType |
| typedef Matrix< Scalar, Dynamic, Dynamic, ColMajor > | MatrixX |
| typedef Matrix< RealScalar, Dynamic, Dynamic, ColMajor > | MatrixXr |
| typedef Matrix< RealScalar, Dynamic, 1 > | VectorType |
| typedef Array< RealScalar, Dynamic, 1 > | ArrayXr |
| typedef Array< Index, 1, Dynamic > | ArrayXi |
| typedef Ref< ArrayXr > | ArrayRef |
| typedef Ref< ArrayXi > | IndicesRef |
| enum | |
| typedef MatrixType::StorageIndex | StorageIndex |
| typedef Eigen::Index | Index |
Public Member Functions | |
| BDCSVD () | |
| Default Constructor. | |
| BDCSVD (Index rows, Index cols, unsigned int computationOptions=0) | |
| Default Constructor with memory preallocation. | |
| BDCSVD (const MatrixType &matrix, unsigned int computationOptions=0) | |
| Constructor performing the decomposition of given matrix. | |
| ~BDCSVD () | |
| BDCSVD & | compute (const MatrixType &matrix, unsigned int computationOptions) |
| Method performing the decomposition of given matrix using custom options. | |
| BDCSVD & | compute (const MatrixType &matrix) |
| Method performing the decomposition of given matrix using current options. | |
| void | setSwitchSize (int s) |
| Index | rows () const |
| Index | cols () const |
| bool | computeU () const |
| bool | computeV () const |
| BDCSVD< _MatrixType > & | derived () |
| const BDCSVD< _MatrixType > & | derived () const |
| const MatrixUType & | matrixU () const |
| const MatrixVType & | matrixV () const |
| const SingularValuesType & | singularValues () const |
| Index | nonzeroSingularValues () const |
| Index | rank () const |
| BDCSVD< _MatrixType > & | setThreshold (const RealScalar &threshold) |
| BDCSVD< _MatrixType > & | setThreshold (Default_t) |
| RealScalar | threshold () const |
| const Solve< BDCSVD< _MatrixType >, Rhs > | solve (const MatrixBase< Rhs > &b) const |
| EIGEN_DEVICE_FUNC void | _solve_impl (const RhsType &rhs, DstType &dst) const |
| void | _solve_impl (const RhsType &rhs, DstType &dst) const |
Public Attributes | |
| int | m_numIters |
Static Protected Member Functions | |
| static void | check_template_parameters () |
Protected Attributes | |
| MatrixXr | m_naiveU |
| MatrixXr | m_naiveV |
| MatrixXr | m_computed |
| Index | m_nRec |
| ArrayXr | m_workspace |
| ArrayXi | m_workspaceI |
| int | m_algoswap |
| bool | m_isTranspose |
| bool | m_compU |
| bool | m_compV |
| SingularValuesType | m_singularValues |
| Index | m_diagSize |
| bool | m_computeFullU |
| bool | m_computeFullV |
| bool | m_computeThinU |
| bool | m_computeThinV |
| MatrixUType | m_matrixU |
| MatrixVType | m_matrixV |
| bool | m_isInitialized |
| Index | m_nonzeroSingularValues |
| bool | m_isAllocated |
| bool | m_usePrescribedThreshold |
| unsigned int | m_computationOptions |
| Index | m_rows |
| Index | m_cols |
| RealScalar | m_prescribedThreshold |
Private Types | |
| typedef SVDBase< BDCSVD > | Base |
Private Member Functions | |
| void | allocate (Index rows, Index cols, unsigned int computationOptions) |
| void | divide (Index firstCol, Index lastCol, Index firstRowW, Index firstColW, Index shift) |
| void | computeSVDofM (Index firstCol, Index n, MatrixXr &U, VectorType &singVals, MatrixXr &V) |
| void | computeSingVals (const ArrayRef &col0, const ArrayRef &diag, const IndicesRef &perm, VectorType &singVals, ArrayRef shifts, ArrayRef mus) |
| void | perturbCol0 (const ArrayRef &col0, const ArrayRef &diag, const IndicesRef &perm, const VectorType &singVals, const ArrayRef &shifts, const ArrayRef &mus, ArrayRef zhat) |
| 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 | 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 | deflation (Index firstCol, Index lastCol, Index k, Index firstRowW, Index firstColW, Index shift) |
| template<typename HouseholderU , typename HouseholderV , typename NaiveU , typename NaiveV > | |
| void | copyUV (const HouseholderU &householderU, const HouseholderV &householderV, const NaiveU &naiveU, const NaiveV &naivev) |
| 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.| typedef Ref<ArrayXr> Eigen::BDCSVD< _MatrixType >::ArrayRef |
| typedef Array<Index,1,Dynamic> Eigen::BDCSVD< _MatrixType >::ArrayXi |
| typedef Array<RealScalar, Dynamic, 1> Eigen::BDCSVD< _MatrixType >::ArrayXr |
|
private |
|
inherited |
| typedef Ref<ArrayXi> Eigen::BDCSVD< _MatrixType >::IndicesRef |
| typedef NumTraits<RealScalar>::Literal Eigen::BDCSVD< _MatrixType >::Literal |
| typedef _MatrixType Eigen::BDCSVD< _MatrixType >::MatrixType |
| typedef Base::MatrixUType Eigen::BDCSVD< _MatrixType >::MatrixUType |
| typedef Base::MatrixVType Eigen::BDCSVD< _MatrixType >::MatrixVType |
| typedef Matrix<Scalar, Dynamic, Dynamic, ColMajor> Eigen::BDCSVD< _MatrixType >::MatrixX |
| typedef Matrix<RealScalar, Dynamic, Dynamic, ColMajor> Eigen::BDCSVD< _MatrixType >::MatrixXr |
| typedef NumTraits<typenameMatrixType::Scalar>::Real Eigen::BDCSVD< _MatrixType >::RealScalar |
| typedef MatrixType::Scalar Eigen::BDCSVD< _MatrixType >::Scalar |
| typedef Base::SingularValuesType Eigen::BDCSVD< _MatrixType >::SingularValuesType |
|
inherited |
| typedef Matrix<RealScalar, Dynamic, 1> Eigen::BDCSVD< _MatrixType >::VectorType |
|
inherited |
| anonymous enum |
| Enumerator | |
|---|---|
| RowsAtCompileTime | |
| ColsAtCompileTime | |
| DiagSizeAtCompileTime | |
| MaxRowsAtCompileTime | |
| MaxColsAtCompileTime | |
| MaxDiagSizeAtCompileTime | |
| MatrixOptions | |
|
inline |
Default Constructor.
The default constructor is useful in cases in which the user intends to perform decompositions via BDCSVD::compute(const MatrixType&).
|
inline |
Default Constructor with memory preallocation.
Like the default constructor but with preallocation of the internal data according to the specified problem size.
References Eigen::BDCSVD< _MatrixType >::allocate(), Eigen::BDCSVD< _MatrixType >::cols(), and Eigen::BDCSVD< _MatrixType >::rows().
Here is the call graph for this function:
|
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.
References Eigen::BDCSVD< _MatrixType >::compute().
Here is the call graph for this function:
|
inline |
|
inherited |
|
inherited |
|
private |
Referenced by Eigen::BDCSVD< _MatrixType >::BDCSVD().
Here is the caller graph for this function:
|
inlinestaticprotectedinherited |
|
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).
References Eigen::BDCSVD< _MatrixType >::compute(), and Eigen::SVDBase< BDCSVD< _MatrixType > >::m_computationOptions.
Here is the call graph for this function:| BDCSVD< MatrixType > & Eigen::BDCSVD< MatrixType >::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.
References Eigen::internal::UpperBidiagonalization< _MatrixType >::bidiagonal(), Eigen::internal::UpperBidiagonalization< _MatrixType >::householderU(), Eigen::internal::UpperBidiagonalization< _MatrixType >::householderV(), Eigen::SVDBase< Derived >::matrixU(), Eigen::SVDBase< Derived >::matrixV(), Eigen::SVDBase< Derived >::nonzeroSingularValues(), scale(), Eigen::PlainObjectBase< Derived >::setZero(), Eigen::SVDBase< Derived >::singularValues(), and Eigen::internal::BandMatrixBase< Derived >::toDenseMatrix().
Referenced by Eigen::BDCSVD< _MatrixType >::BDCSVD(), and Eigen::BDCSVD< _MatrixType >::compute().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
References eigen_internal_assert, Eigen::numext::isfinite(), and sqrt().
Here is the call graph for this function:
|
private |
References Eigen::PlainObjectBase< Derived >::setZero().
Here is the call graph for this function:
|
private |
References Eigen::PlainObjectBase< Derived >::cols(), head(), Eigen::PlainObjectBase< Derived >::resize(), Eigen::SVDBase< Derived >::singularValues(), and Eigen::PlainObjectBase< Derived >::swap().
Here is the call graph for this function:
|
inline |
|
inline |
|
private |
|
private |
References Eigen::Dynamic, and eigen_internal_assert.
|
private |
|
private |
References sqrt().
Here is the call graph for this function:
|
inlineinherited |
|
inlineinherited |
|
private |
References Eigen::Aligned, Eigen::ComputeFullU, Eigen::ComputeFullV, and sqrt().
Here is the call graph for this function:
|
inlineinherited |
For the SVD decomposition of a n-by-p matrix, letting m be the minimum of n and p, the U matrix is n-by-n if you asked for ComputeFullU , and is n-by-m if you asked for ComputeThinU .
The m first columns of U are the left singular vectors of the matrix being decomposed.
This method asserts that you asked for U to be computed.
|
inlineinherited |
For the SVD decomposition of a n-by-p matrix, letting m be the minimum of n and p, the V matrix is p-by-p if you asked for ComputeFullV , and is p-by-m if you asked for ComputeThinV .
The m first columns of V are the right singular vectors of the matrix being decomposed.
This method asserts that you asked for V to be computed.
|
inlineinherited |
|
private |
References sqrt().
Here is the call graph for this function:
|
inlineinherited |
*this is the SVD.
|
inline |
|
staticprivate |
|
inline |
References eigen_assert, and Eigen::BDCSVD< _MatrixType >::m_algoswap.
|
inlineinherited |
Allows to prescribe a threshold to be used by certain methods, such as rank() and solve(), which need to determine when singular values are to be considered nonzero. This is not used for the SVD decomposition itself.
When it needs to get the threshold value, Eigen calls threshold(). The default is NumTraits<Scalar>::epsilon()
| threshold | The new value to use as the threshold. |
A singular value will be considered nonzero if its value is strictly greater than
If you want to come back to the default behavior, call setThreshold(Default_t)
|
inlineinherited |
Allows to come back to the default behavior, letting Eigen use its default formula for determining the threshold.
You should pass the special object Eigen::Default as parameter here.
See the documentation of setThreshold(const RealScalar&).
|
inlineinherited |
For the SVD decomposition of a n-by-p matrix, letting m be the minimum of n and p, the returned vector has size m. Singular values are always sorted in decreasing order.
|
inlineinherited |
| b | the right-hand-side of the equation to solve. |
|
private |
|
inlineinherited |
Returns the threshold that will be used by certain methods such as rank().
See the documentation of setThreshold(const RealScalar&).
|
protected |
Referenced by Eigen::BDCSVD< _MatrixType >::setSwitchSize().
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| int Eigen::BDCSVD< _MatrixType >::m_numIters |
|
protectedinherited |
|
protectedinherited |
|
protected |
|
protectedinherited |
|
protected |
|
protected |