diff --git a/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h b/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h index 6ca7bd427..73ca9bfde 100644 --- a/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h +++ b/Eigen/src/IterativeLinearSolvers/BasicPreconditioners.h @@ -37,12 +37,13 @@ class DiagonalPreconditioner typedef typename Vector::Index Index; public: + // this typedef is only to export the scalar type and compile-time dimensions to solve_retval typedef Matrix MatrixType; DiagonalPreconditioner() : m_isInitialized(false) {} - template - DiagonalPreconditioner(const MatrixType& mat) : m_invdiag(mat.cols()) + template + DiagonalPreconditioner(const MatType& mat) : m_invdiag(mat.cols()) { compute(mat); } @@ -50,19 +51,19 @@ class DiagonalPreconditioner Index rows() const { return m_invdiag.size(); } Index cols() const { return m_invdiag.size(); } - template - DiagonalPreconditioner& analyzePattern(const MatrixType& ) + template + DiagonalPreconditioner& analyzePattern(const MatType& ) { return *this; } - template - DiagonalPreconditioner& factorize(const MatrixType& mat) + template + DiagonalPreconditioner& factorize(const MatType& mat) { m_invdiag.resize(mat.cols()); for(int j=0; j - DiagonalPreconditioner& compute(const MatrixType& mat) + template + DiagonalPreconditioner& compute(const MatType& mat) { return factorize(mat); }