diff options
author | 2015-03-09 21:31:03 +0100 | |
---|---|---|
committer | 2015-03-09 21:31:03 +0100 | |
commit | fd788748889f50536f590b68dfa98db0044e5115 (patch) | |
tree | 7264d9e8aa141daa4a57bf78c175fd1ad1e8376d | |
parent | d4317a85e8266fd9f840986821a2ca1cf673262b (diff) |
Fix compilation of iterative solvers with dense matrices
-rw-r--r-- | Eigen/src/IterativeLinearSolvers/ConjugateGradient.h | 2 | ||||
-rw-r--r-- | Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h | 24 |
2 files changed, 13 insertions, 13 deletions
diff --git a/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h b/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h index 11b8347f7..9e7dd1404 100644 --- a/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h +++ b/Eigen/src/IterativeLinearSolvers/ConjugateGradient.h @@ -185,7 +185,7 @@ public: { typedef typename internal::conditional<UpLo==(Lower|Upper), Ref<const MatrixType>&, - SparseSelfAdjointView<const Ref<const MatrixType>, UpLo> + typename Ref<const MatrixType>::template ConstSelfAdjointViewReturnType<UpLo>::Type >::type MatrixWrapperType; m_iterations = Base::maxIterations(); m_error = Base::m_tolerance; diff --git a/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h b/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h index 46bc0ac78..6477b9de2 100644 --- a/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h +++ b/Eigen/src/IterativeLinearSolvers/IterativeSolverBase.h @@ -52,9 +52,9 @@ public: * this class becomes invalid. Call compute() to update it with the new * matrix A, or modify a copy of A. */ - template<typename SparseMatrixDerived> - explicit IterativeSolverBase(const SparseMatrixBase<SparseMatrixDerived>& A) - : mp_matrix(A) + template<typename MatrixDerived> + explicit IterativeSolverBase(const EigenBase<MatrixDerived>& A) + : mp_matrix(A.derived()) { init(); compute(mp_matrix); @@ -67,8 +67,8 @@ public: * Currently, this function mostly calls analyzePattern on the preconditioner. In the future * we might, for instance, implement column reordering for faster matrix vector products. */ - template<typename SparseMatrixDerived> - Derived& analyzePattern(const SparseMatrixBase<SparseMatrixDerived>& A) + template<typename MatrixDerived> + Derived& analyzePattern(const EigenBase<MatrixDerived>& A) { grab(A.derived()); m_preconditioner.analyzePattern(mp_matrix); @@ -87,8 +87,8 @@ public: * this class becomes invalid. Call compute() to update it with the new * matrix A, or modify a copy of A. */ - template<typename SparseMatrixDerived> - Derived& factorize(const SparseMatrixBase<SparseMatrixDerived>& A) + template<typename MatrixDerived> + Derived& factorize(const EigenBase<MatrixDerived>& A) { eigen_assert(m_analysisIsOk && "You must first call analyzePattern()"); grab(A.derived()); @@ -108,8 +108,8 @@ public: * this class becomes invalid. Call compute() to update it with the new * matrix A, or modify a copy of A. */ - template<typename SparseMatrixDerived> - Derived& compute(const SparseMatrixBase<SparseMatrixDerived>& A) + template<typename MatrixDerived> + Derived& compute(const EigenBase<MatrixDerived>& A) { grab(A.derived()); m_preconditioner.compute(mp_matrix); @@ -223,11 +223,11 @@ protected: m_tolerance = NumTraits<Scalar>::epsilon(); } - template<typename SparseMatrixDerived> - void grab(const SparseMatrixBase<SparseMatrixDerived> &A) + template<typename MatrixDerived> + void grab(const EigenBase<MatrixDerived> &A) { mp_matrix.~Ref<const MatrixType>(); - ::new (&mp_matrix) Ref<const MatrixType>(A); + ::new (&mp_matrix) Ref<const MatrixType>(A.derived()); } void grab(const Ref<const MatrixType> &A) |