aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported
diff options
context:
space:
mode:
authorGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2013-08-21 14:34:48 +0100
committerGravatar Jitse Niesen <jitse@maths.leeds.ac.uk>2013-08-21 14:34:48 +0100
commitd1c48f16061a60d92ab6f4df1e877f20c17d78d0 (patch)
treeb3891546593ede03619debeb488abc14d22d4622 /unsupported
parent1b8394f71f613b60525976a8240e30bc3ebdd4dc (diff)
BDCSVD: Use HouseholderSeq directly.
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Eigen/src/SVD/BDCSVD.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/unsupported/Eigen/src/SVD/BDCSVD.h b/unsupported/Eigen/src/SVD/BDCSVD.h
index 3c41e4e46..d5f0a3f21 100644
--- a/unsupported/Eigen/src/SVD/BDCSVD.h
+++ b/unsupported/Eigen/src/SVD/BDCSVD.h
@@ -203,7 +203,8 @@ private:
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);
- void copyUV(MatrixX householderU, MatrixX houseHolderV);
+ void copyUV(const typename internal::UpperBidiagonalization<MatrixX>::HouseholderUSequenceType& householderU,
+ const typename internal::UpperBidiagonalization<MatrixX>::HouseholderVSequenceType& householderV);
protected:
MatrixXr m_naiveU, m_naiveV;
@@ -281,7 +282,7 @@ BDCSVD<MatrixType>::compute(const MatrixType& matrix, unsigned int computationOp
if (isTranspose) copy = matrix.adjoint();
else copy = matrix;
- internal::UpperBidiagonalization<MatrixX > bid(copy);
+ internal::UpperBidiagonalization<MatrixX> bid(copy);
//**** step 2 Divide
m_computed.topRows(this->m_diagSize) = bid.bidiagonal().toDenseMatrix().transpose();
@@ -309,9 +310,10 @@ BDCSVD<MatrixType>::compute(const MatrixType& matrix, unsigned int computationOp
}// end compute
-// TODO: this function should accept householder sequences to save converting them to matrix
template<typename MatrixType>
-void BDCSVD<MatrixType>::copyUV(MatrixX householderU, MatrixX householderV){
+void BDCSVD<MatrixType>::copyUV(const typename internal::UpperBidiagonalization<MatrixX>::HouseholderUSequenceType& householderU,
+ const typename internal::UpperBidiagonalization<MatrixX>::HouseholderVSequenceType& householderV)
+{
// Note exchange of U and V: m_matrixU is set from m_naiveV and vice versa
if (this->computeU()){
Index Ucols = this->m_computeThinU ? this->m_nonzeroSingularValues : householderU.cols();