diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-01-07 21:53:52 -0500 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2010-01-07 21:53:52 -0500 |
commit | 58fb27cd566f4057cee914be4cfe4f87abe8dc04 (patch) | |
tree | 44b86687bfa119443960a2c27ae4a9e4e2c3d3dc /Eigen | |
parent | 7befc8d6f396b4013ff30382dbb8be4aea906908 (diff) |
undo
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/SVD | 1 | ||||
-rw-r--r-- | Eigen/src/Core/BandMatrix.h | 18 | ||||
-rw-r--r-- | Eigen/src/Householder/HouseholderSequence.h | 8 | ||||
-rw-r--r-- | Eigen/src/QR/HouseholderQR.h | 2 |
4 files changed, 18 insertions, 11 deletions
@@ -25,6 +25,7 @@ namespace Eigen { #include "src/misc/Solve.h" #include "src/SVD/SVD.h" #include "src/SVD/JacobiSVD.h" +#include "src/SVD/UpperBidiagonalization.h" } // namespace Eigen diff --git a/Eigen/src/Core/BandMatrix.h b/Eigen/src/Core/BandMatrix.h index 7943e6280..67684eca3 100644 --- a/Eigen/src/Core/BandMatrix.h +++ b/Eigen/src/Core/BandMatrix.h @@ -171,15 +171,21 @@ class BandMatrix : public AnyMatrixBase<BandMatrix<_Scalar,Rows,Cols,Supers,Subs return Block<DataType,1,Dynamic>(m_data, supers()-i, std::max(0,i), 1, diagonalLength(i)); } - DenseMatrixType toDenseMatrix() const + template<typename Dest> inline void evalTo(Dest& dst) const { - DenseMatrixType res(rows(),cols()); - res.setZero(); - res.diagonal() = diagonal(); + dst.resize(rows(),cols()); + dst.setZero(); + dst.diagonal() = diagonal(); for (int i=1; i<=supers();++i) - res.diagonal(i) = diagonal(i); + dst.diagonal(i) = diagonal(i); for (int i=1; i<=subs();++i) - res.diagonal(-i) = diagonal(-i); + dst.diagonal(-i) = diagonal(-i); + } + + DenseMatrixType toDenseMatrix() const + { + DenseMatrixType res(rows(),cols()); + evalTo(res); return res; } diff --git a/Eigen/src/Householder/HouseholderSequence.h b/Eigen/src/Householder/HouseholderSequence.h index 26e0f6a88..ecdf903a1 100644 --- a/Eigen/src/Householder/HouseholderSequence.h +++ b/Eigen/src/Householder/HouseholderSequence.h @@ -105,10 +105,10 @@ template<typename VectorsType, typename CoeffsType> class HouseholderSequence { if(m_trans) dst.corner(BottomRight, length-k, length-k) - .applyHouseholderOnTheRight(m_vectors.col(k).tail(length-k-1), m_coeffs.coeff(k), &temp.coeffRef(0)); + .applyHouseholderOnTheRight(m_vectors.col(k).tail(length-k-1), m_coeffs.coeff(k), &temp.coeffRef(0)); else dst.corner(BottomRight, length-k, length-k) - .applyHouseholderOnTheLeft(m_vectors.col(k).tail(length-k-1), m_coeffs.coeff(k), &temp.coeffRef(k)); + .applyHouseholderOnTheLeft(m_vectors.col(k).tail(length-k-1), m_coeffs.coeff(k), &temp.coeffRef(k)); } } @@ -121,7 +121,7 @@ template<typename VectorsType, typename CoeffsType> class HouseholderSequence for(int k = 0; k < vecs; ++k) { int actual_k = m_trans ? vecs-k-1 : k; - dst.corner(BottomRight, dst.rows(), length-actual_k) + dst.block(0, dst.cols()-length, dst.rows(), length-actual_k) .applyHouseholderOnTheRight(m_vectors.col(actual_k).tail(length-actual_k-1), m_coeffs.coeff(actual_k), &temp.coeffRef(0)); } } @@ -135,7 +135,7 @@ template<typename VectorsType, typename CoeffsType> class HouseholderSequence for(int k = 0; k < vecs; ++k) { int actual_k = m_trans ? k : vecs-k-1; - dst.corner(BottomRight, length-actual_k, dst.cols()) + dst.block(dst.rows()-length, 0, length-actual_k, dst.cols()) .applyHouseholderOnTheLeft(m_vectors.col(actual_k).tail(length-actual_k-1), m_coeffs.coeff(actual_k), &temp.coeffRef(0)); } } diff --git a/Eigen/src/QR/HouseholderQR.h b/Eigen/src/QR/HouseholderQR.h index 3afaed9e0..49ee1fa79 100644 --- a/Eigen/src/QR/HouseholderQR.h +++ b/Eigen/src/QR/HouseholderQR.h @@ -55,7 +55,7 @@ template<typename _MatrixType> class HouseholderQR RowsAtCompileTime = MatrixType::RowsAtCompileTime, ColsAtCompileTime = MatrixType::ColsAtCompileTime, Options = MatrixType::Options, - DiagSizeAtCompileTime = EIGEN_ENUM_MIN(ColsAtCompileTime,RowsAtCompileTime) + DiagSizeAtCompileTime = EIGEN_SIZE_MIN(ColsAtCompileTime,RowsAtCompileTime) }; typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; |