Public Types | Public Member Functions | Protected Attributes | Private Types | Private Member Functions
Eigen::BDCSVD< _MatrixType > Class Template Reference

class Bidiagonal Divide and Conquer SVD More...

#include <BDCSVD.h>

Inheritance diagram for Eigen::BDCSVD< _MatrixType >:
Inheritance graph
[legend]

List of all members.

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 MatrixUTypematrixU () const
const MatrixVTypematrixV () 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)

Detailed Description

template<typename _MatrixType>
class Eigen::BDCSVD< _MatrixType >

class Bidiagonal Divide and Conquer SVD

Parameters:
MatrixTypethe type of the matrix of which we are computing the SVD decomposition We plan to have a very similar interface to JacobiSVD on this class. It should be used to speed up the calcul of SVD for big matrices.

Definition at line 38 of file BDCSVD.h.


Member Typedef Documentation

template<typename _MatrixType>
typedef SVDBase<_MatrixType> Eigen::BDCSVD< _MatrixType >::Base [private]

Definition at line 40 of file BDCSVD.h.

template<typename _MatrixType>
typedef internal::plain_col_type<MatrixType>::type Eigen::BDCSVD< _MatrixType >::ColType

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 68 of file BDCSVD.h.

template<typename _MatrixType>
typedef MatrixType::Index Eigen::BDCSVD< _MatrixType >::Index

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 49 of file BDCSVD.h.

template<typename _MatrixType>
typedef _MatrixType Eigen::BDCSVD< _MatrixType >::MatrixType

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 46 of file BDCSVD.h.

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 62 of file BDCSVD.h.

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 65 of file BDCSVD.h.

template<typename _MatrixType>
typedef Matrix<Scalar, Dynamic, Dynamic> Eigen::BDCSVD< _MatrixType >::MatrixX

Definition at line 69 of file BDCSVD.h.

template<typename _MatrixType>
typedef Matrix<RealScalar, Dynamic, Dynamic> Eigen::BDCSVD< _MatrixType >::MatrixXr

Definition at line 70 of file BDCSVD.h.

template<typename _MatrixType>
typedef NumTraits<typename MatrixType::Scalar>::Real Eigen::BDCSVD< _MatrixType >::RealScalar

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 48 of file BDCSVD.h.

template<typename _MatrixType>
typedef internal::plain_row_type<MatrixType>::type Eigen::BDCSVD< _MatrixType >::RowType

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 67 of file BDCSVD.h.

template<typename _MatrixType>
typedef MatrixType::Scalar Eigen::BDCSVD< _MatrixType >::Scalar

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 47 of file BDCSVD.h.

template<typename _MatrixType>
typedef internal::plain_diag_type<MatrixType, RealScalar>::type Eigen::BDCSVD< _MatrixType >::SingularValuesType

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 66 of file BDCSVD.h.

template<typename _MatrixType>
typedef Matrix<RealScalar, Dynamic, 1> Eigen::BDCSVD< _MatrixType >::VectorType

Definition at line 71 of file BDCSVD.h.


Member Enumeration Documentation

template<typename _MatrixType>
anonymous enum
Enumerator:
RowsAtCompileTime 
ColsAtCompileTime 
DiagSizeAtCompileTime 
MaxRowsAtCompileTime 
MaxColsAtCompileTime 
MaxDiagSizeAtCompileTime 
MatrixOptions 

Definition at line 50 of file BDCSVD.h.


Constructor & Destructor Documentation

template<typename _MatrixType>
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&).

Definition at line 78 of file BDCSVD.h.

template<typename _MatrixType>
Eigen::BDCSVD< _MatrixType >::BDCSVD ( Index  rows,
Index  cols,
unsigned int  computationOptions = 0 
) [inline]

Default Constructor with memory preallocation.

Like the default constructor but with preallocation of the internal data according to the specified problem size.

See also:
BDCSVD()

Definition at line 90 of file BDCSVD.h.

template<typename _MatrixType>
Eigen::BDCSVD< _MatrixType >::BDCSVD ( const MatrixType matrix,
unsigned int  computationOptions = 0 
) [inline]

Constructor performing the decomposition of given matrix.

Parameters:
matrixthe matrix to decompose
computationOptionsoptional 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.

Definition at line 107 of file BDCSVD.h.

template<typename _MatrixType>
Eigen::BDCSVD< _MatrixType >::~BDCSVD ( ) [inline]

Definition at line 114 of file BDCSVD.h.


Member Function Documentation

template<typename MatrixType >
void Eigen::BDCSVD< MatrixType >::allocate ( Index  rows,
Index  cols,
unsigned int  computationOptions 
) [private]

Reimplemented from Eigen::SVDBase< _MatrixType >.

Definition at line 218 of file BDCSVD.h.

template<typename MatrixType >
SVDBase< MatrixType > & Eigen::BDCSVD< MatrixType >::compute ( const MatrixType matrix,
unsigned int  computationOptions 
)

Method performing the decomposition of given matrix using custom options.

Parameters:
matrixthe matrix to decompose
computationOptionsoptional 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 >.

Definition at line 272 of file BDCSVD.h.

template<typename _MatrixType>
SVDBase<MatrixType>& Eigen::BDCSVD< _MatrixType >::compute ( const MatrixType matrix) [inline]

Method performing the decomposition of given matrix using current options.

Parameters:
matrixthe 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 >.

Definition at line 135 of file BDCSVD.h.

template<>
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.

Parameters:
matrixthe matrix to decompose
computationOptionsoptional 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 >.

Definition at line 255 of file BDCSVD.h.

template<typename MatrixType >
void Eigen::BDCSVD< MatrixType >::copyUV ( MatrixXr  naiveU,
MatrixXr  naiveV,
MatrixX  householderU,
MatrixX  houseHolderV 
) [private]

Definition at line 317 of file BDCSVD.h.

template<typename MatrixType >
void Eigen::BDCSVD< MatrixType >::deflation ( Index  firstCol,
Index  lastCol,
Index  k,
Index  firstRowW,
Index  firstColW,
Index  shift 
) [private]

Definition at line 577 of file BDCSVD.h.

template<typename MatrixType >
void Eigen::BDCSVD< MatrixType >::deflation43 ( Index  firstCol,
Index  shift,
Index  i,
Index  size 
) [private]

Definition at line 505 of file BDCSVD.h.

template<typename MatrixType >
void Eigen::BDCSVD< MatrixType >::deflation44 ( Index  firstColu,
Index  firstColm,
Index  firstRowW,
Index  firstColW,
Index  i,
Index  j,
Index  size 
) [private]

Definition at line 537 of file BDCSVD.h.

template<typename MatrixType >
void Eigen::BDCSVD< MatrixType >::divide ( Index  firstCol,
Index  lastCol,
Index  firstRowW,
Index  firstColW,
Index  shift 
) [private]

Definition at line 363 of file BDCSVD.h.

template<typename _MatrixType>
const MatrixUType& Eigen::BDCSVD< _MatrixType >::matrixU ( ) const [inline]
Returns:
the U matrix.

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 >.

Definition at line 167 of file BDCSVD.h.

template<typename _MatrixType>
const MatrixVType& Eigen::BDCSVD< _MatrixType >::matrixV ( ) const [inline]
Returns:
the V matrix.

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 >.

Definition at line 183 of file BDCSVD.h.

template<typename _MatrixType>
void Eigen::BDCSVD< _MatrixType >::setSwitchSize ( int  s) [inline]

Definition at line 140 of file BDCSVD.h.

template<typename _MatrixType>
template<typename Rhs >
const internal::solve_retval<BDCSVD, Rhs> Eigen::BDCSVD< _MatrixType >::solve ( const MatrixBase< Rhs > &  b) const [inline]
Returns:
a (least squares) solution of $ A x = b $ using the current SVD decomposition of A.
Parameters:
bthe right - hand - side of the equation to solve.
Note:
Solving requires both U and V to be computed. Thin U and V are enough, there is no need for full U or V.
SVD solving is implicitly least - squares. Thus, this method serves both purposes of exact solving and least - squares solving. In other words, the returned solution is guaranteed to minimize the Euclidean norm $ \Vert A x - b \Vert $.

Definition at line 158 of file BDCSVD.h.


Member Data Documentation

template<typename _MatrixType>
int Eigen::BDCSVD< _MatrixType >::algoswap [protected]

Definition at line 210 of file BDCSVD.h.

template<typename _MatrixType>
bool Eigen::BDCSVD< _MatrixType >::compU [protected]

Definition at line 211 of file BDCSVD.h.

template<typename _MatrixType>
bool Eigen::BDCSVD< _MatrixType >::compV [protected]

Definition at line 211 of file BDCSVD.h.

template<typename _MatrixType>
bool Eigen::BDCSVD< _MatrixType >::isTranspose [protected]

Definition at line 211 of file BDCSVD.h.

template<typename _MatrixType>
MatrixXr Eigen::BDCSVD< _MatrixType >::m_computed [protected]

Definition at line 208 of file BDCSVD.h.

template<typename _MatrixType>
MatrixXr Eigen::BDCSVD< _MatrixType >::m_naiveU [protected]

Definition at line 207 of file BDCSVD.h.

template<typename _MatrixType>
MatrixXr Eigen::BDCSVD< _MatrixType >::m_naiveV [protected]

Definition at line 207 of file BDCSVD.h.

template<typename _MatrixType>
Index Eigen::BDCSVD< _MatrixType >::nRec [protected]

Definition at line 209 of file BDCSVD.h.


The documentation for this class was generated from the following file:


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:39:15