class Bidiagonal Divide and Conquer SVD More...
#include <BDCSVD.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 internal::plain_col_type < MatrixType >::type | ColType |
typedef MatrixType::Index | Index |
typedef _MatrixType | MatrixType |
typedef Matrix< Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime > | MatrixUType |
typedef Matrix< Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime > | MatrixVType |
typedef Matrix< Scalar, Dynamic, Dynamic > | MatrixX |
typedef Matrix< RealScalar, Dynamic, Dynamic > | MatrixXr |
typedef NumTraits< typename MatrixType::Scalar >::Real | RealScalar |
typedef internal::plain_row_type < MatrixType >::type | RowType |
typedef MatrixType::Scalar | Scalar |
typedef internal::plain_diag_type < MatrixType, RealScalar > ::type | SingularValuesType |
typedef Matrix< RealScalar, Dynamic, 1 > | VectorType |
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. | |
SVDBase< MatrixType > & | compute (const MatrixType &matrix, unsigned int computationOptions) |
Method performing the decomposition of given matrix using custom options. | |
SVDBase< MatrixType > & | compute (const MatrixType &matrix) |
Method performing the decomposition of given matrix using current options. | |
template<> | |
SVDBase< Matrix< int, Dynamic, Dynamic > > & | compute (const MatrixType &matrix, unsigned int computationOptions) |
Method performing the decomposition of given matrix using custom options. | |
const MatrixUType & | matrixU () const |
const MatrixVType & | matrixV () const |
void | setSwitchSize (int s) |
template<typename Rhs > | |
const internal::solve_retval < BDCSVD, Rhs > | solve (const MatrixBase< Rhs > &b) const |
~BDCSVD () | |
Protected Attributes | |
int | algoswap |
bool | compU |
bool | compV |
bool | isTranspose |
MatrixXr | m_computed |
MatrixXr | m_naiveU |
MatrixXr | m_naiveV |
Index | nRec |
Private Types | |
typedef SVDBase< _MatrixType > | Base |
Private Member Functions | |
void | allocate (Index rows, Index cols, unsigned int computationOptions) |
void | copyUV (MatrixXr naiveU, MatrixXr naiveV, MatrixX householderU, MatrixX houseHolderV) |
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) |
class Bidiagonal Divide and Conquer SVD
typedef SVDBase<_MatrixType> Eigen::BDCSVD< _MatrixType >::Base [private] |
typedef internal::plain_col_type<MatrixType>::type Eigen::BDCSVD< _MatrixType >::ColType |
Reimplemented from Eigen::SVDBase< _MatrixType >.
typedef MatrixType::Index Eigen::BDCSVD< _MatrixType >::Index |
Reimplemented from Eigen::SVDBase< _MatrixType >.
typedef _MatrixType Eigen::BDCSVD< _MatrixType >::MatrixType |
Reimplemented from Eigen::SVDBase< _MatrixType >.
typedef Matrix<Scalar, RowsAtCompileTime, RowsAtCompileTime, MatrixOptions, MaxRowsAtCompileTime, MaxRowsAtCompileTime> Eigen::BDCSVD< _MatrixType >::MatrixUType |
Reimplemented from Eigen::SVDBase< _MatrixType >.
typedef Matrix<Scalar, ColsAtCompileTime, ColsAtCompileTime, MatrixOptions, MaxColsAtCompileTime, MaxColsAtCompileTime> Eigen::BDCSVD< _MatrixType >::MatrixVType |
Reimplemented from Eigen::SVDBase< _MatrixType >.
typedef Matrix<RealScalar, Dynamic, Dynamic> Eigen::BDCSVD< _MatrixType >::MatrixXr |
typedef NumTraits<typename MatrixType::Scalar>::Real Eigen::BDCSVD< _MatrixType >::RealScalar |
Reimplemented from Eigen::SVDBase< _MatrixType >.
typedef internal::plain_row_type<MatrixType>::type Eigen::BDCSVD< _MatrixType >::RowType |
Reimplemented from Eigen::SVDBase< _MatrixType >.
typedef MatrixType::Scalar Eigen::BDCSVD< _MatrixType >::Scalar |
Reimplemented from Eigen::SVDBase< _MatrixType >.
typedef internal::plain_diag_type<MatrixType, RealScalar>::type Eigen::BDCSVD< _MatrixType >::SingularValuesType |
Reimplemented from Eigen::SVDBase< _MatrixType >.
typedef Matrix<RealScalar, Dynamic, 1> Eigen::BDCSVD< _MatrixType >::VectorType |
anonymous enum |
Eigen::BDCSVD< _MatrixType >::BDCSVD | ( | ) | [inline] |
Default Constructor.
The default constructor is useful in cases in which the user intends to perform decompositions via BDCSVD::compute(const MatrixType&).
Eigen::BDCSVD< _MatrixType >::BDCSVD | ( | Index | rows, |
Index | cols, | ||
unsigned int | computationOptions = 0 |
||
) | [inline] |
Eigen::BDCSVD< _MatrixType >::BDCSVD | ( | const MatrixType & | matrix, |
unsigned int | computationOptions = 0 |
||
) | [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.
Eigen::BDCSVD< _MatrixType >::~BDCSVD | ( | ) | [inline] |
void Eigen::BDCSVD< MatrixType >::allocate | ( | Index | rows, |
Index | cols, | ||
unsigned int | computationOptions | ||
) | [private] |
Reimplemented from Eigen::SVDBase< _MatrixType >.
SVDBase< 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.
Reimplemented from Eigen::SVDBase< _MatrixType >.
SVDBase<MatrixType>& Eigen::BDCSVD< _MatrixType >::compute | ( | const MatrixType & | matrix | ) | [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).
Reimplemented from Eigen::SVDBase< _MatrixType >.
SVDBase< Matrix< int, Dynamic, Dynamic > > & Eigen::BDCSVD< Matrix< int, Dynamic, Dynamic > >::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.
Reimplemented from Eigen::SVDBase< _MatrixType >.
void Eigen::BDCSVD< MatrixType >::copyUV | ( | MatrixXr | naiveU, |
MatrixXr | naiveV, | ||
MatrixX | householderU, | ||
MatrixX | houseHolderV | ||
) | [private] |
void Eigen::BDCSVD< MatrixType >::deflation | ( | Index | firstCol, |
Index | lastCol, | ||
Index | k, | ||
Index | firstRowW, | ||
Index | firstColW, | ||
Index | shift | ||
) | [private] |
void Eigen::BDCSVD< MatrixType >::deflation43 | ( | Index | firstCol, |
Index | shift, | ||
Index | i, | ||
Index | size | ||
) | [private] |
void Eigen::BDCSVD< MatrixType >::deflation44 | ( | Index | firstColu, |
Index | firstColm, | ||
Index | firstRowW, | ||
Index | firstColW, | ||
Index | i, | ||
Index | j, | ||
Index | size | ||
) | [private] |
void Eigen::BDCSVD< MatrixType >::divide | ( | Index | firstCol, |
Index | lastCol, | ||
Index | firstRowW, | ||
Index | firstColW, | ||
Index | shift | ||
) | [private] |
const MatrixUType& Eigen::BDCSVD< _MatrixType >::matrixU | ( | ) | const [inline] |
For the SVDBase 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.
Reimplemented from Eigen::SVDBase< _MatrixType >.
const MatrixVType& Eigen::BDCSVD< _MatrixType >::matrixV | ( | ) | const [inline] |
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.
Reimplemented from Eigen::SVDBase< _MatrixType >.
void Eigen::BDCSVD< _MatrixType >::setSwitchSize | ( | int | s | ) | [inline] |
const internal::solve_retval<BDCSVD, Rhs> Eigen::BDCSVD< _MatrixType >::solve | ( | const MatrixBase< Rhs > & | b | ) | const [inline] |
b | the right - hand - side of the equation to solve. |
int Eigen::BDCSVD< _MatrixType >::algoswap [protected] |
bool Eigen::BDCSVD< _MatrixType >::compU [protected] |
bool Eigen::BDCSVD< _MatrixType >::compV [protected] |
bool Eigen::BDCSVD< _MatrixType >::isTranspose [protected] |
MatrixXr Eigen::BDCSVD< _MatrixType >::m_computed [protected] |
MatrixXr Eigen::BDCSVD< _MatrixType >::m_naiveU [protected] |
MatrixXr Eigen::BDCSVD< _MatrixType >::m_naiveV [protected] |
Index Eigen::BDCSVD< _MatrixType >::nRec [protected] |