diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h b/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h index 6e8b03cea..54f275fde 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixPower.h @@ -76,6 +76,15 @@ class MatrixPower : public MatrixPowerBase,MatrixType> private: using Base::m_A; + + static const int Rows = MatrixType::RowsAtCompileTime; + static const int Cols = MatrixType::ColsAtCompileTime; + static const int Options = MatrixType::Options; + static const int MaxRows = MatrixType::MaxRowsAtCompileTime; + static const int MaxCols = MatrixType::MaxColsAtCompileTime; + + typedef Matrix,Rows,Cols,Options,MaxRows,MaxCols> ComplexMatrix; + MatrixType m_tmp1, m_tmp2; ComplexMatrix m_T, m_U, m_fT; bool m_init; @@ -149,7 +158,7 @@ typename MatrixPower::Base::RealScalar MatrixPower::modf m_U = schurOfA.matrixU(); m_init = true; - const RealArray absTdiag = m_T.diagonal().array().abs(); + const Array absTdiag = m_T.diagonal().array().abs(); maxAbsEival = absTdiag.maxCoeff(); minAbsEival = absTdiag.minCoeff(); } diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h b/unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h index ca5a604fc..0cb50694a 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h @@ -219,9 +219,7 @@ void MatrixPowerTriangularAtomic::computeBig(MatrixType& res, R #define EIGEN_MATRIX_POWER_PUBLIC_INTERFACE(Derived) \ typedef MatrixPowerBase,MatrixType> Base; \ using typename Base::Scalar; \ - using typename Base::RealScalar; \ - using typename Base::ComplexMatrix; \ - using typename Base::RealArray; + using typename Base::RealScalar; #define EIGEN_MATRIX_POWER_PRODUCT_PUBLIC_INTERFACE(Derived) \ typedef MatrixPowerProductBase Base; \ @@ -257,17 +255,9 @@ template class MatrixPowerBase { protected: - static const int Rows = MatrixType::RowsAtCompileTime; - static const int Cols = MatrixType::ColsAtCompileTime; - static const int Options = MatrixType::Options; - static const int MaxRows = MatrixType::MaxRowsAtCompileTime; - static const int MaxCols = MatrixType::MaxColsAtCompileTime; - typedef typename MatrixType::Scalar Scalar; typedef typename MatrixType::RealScalar RealScalar; typedef typename MatrixType::Index Index; - typedef Matrix,Rows,Cols,Options,MaxRows,MaxCols> ComplexMatrix; - typedef Array RealArray; const MatrixType& m_A; const bool m_del; // whether to delete the pointer at destruction