mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #1092: fix iterative solver ctors for expressions as input
This commit is contained in:
@@ -133,8 +133,8 @@ class DGMRES : public IterativeSolverBase<DGMRES<_MatrixType,_Preconditioner> >
|
||||
* this class becomes invalid. Call compute() to update it with the new
|
||||
* matrix A, or modify a copy of A.
|
||||
*/
|
||||
DGMRES(const MatrixType& A) : Base(A),m_restart(30),m_neig(0),m_r(0),m_maxNeig(5),m_isDeflAllocated(false),m_isDeflInitialized(false)
|
||||
{}
|
||||
template<typename MatrixDerived>
|
||||
explicit DGMRES(const EigenBase<MatrixDerived>& A) : Base(A.derived()), m_restart(30),m_neig(0),m_r(0),m_maxNeig(5),m_isDeflAllocated(false),m_isDeflInitialized(false) {}
|
||||
|
||||
~DGMRES() {}
|
||||
|
||||
|
||||
@@ -285,7 +285,8 @@ public:
|
||||
* this class becomes invalid. Call compute() to update it with the new
|
||||
* matrix A, or modify a copy of A.
|
||||
*/
|
||||
GMRES(const MatrixType& A) : Base(A), m_restart(30) {}
|
||||
template<typename MatrixDerived>
|
||||
explicit GMRES(const EigenBase<MatrixDerived>& A) : Base(A.derived()), m_restart(30) {}
|
||||
|
||||
~GMRES() {}
|
||||
|
||||
|
||||
@@ -228,7 +228,8 @@ namespace Eigen {
|
||||
* this class becomes invalid. Call compute() to update it with the new
|
||||
* matrix A, or modify a copy of A.
|
||||
*/
|
||||
MINRES(const MatrixType& A) : Base(A) {}
|
||||
template<typename MatrixDerived>
|
||||
explicit MINRES(const EigenBase<MatrixDerived>& A) : Base(A.derived()) {}
|
||||
|
||||
/** Destructor. */
|
||||
~MINRES(){}
|
||||
|
||||
Reference in New Issue
Block a user