From d387dfa9dcedf474873691f230a9d6b85ec9ef57 Mon Sep 17 00:00:00 2001 From: Chen-Pang He Date: Mon, 24 Sep 2012 23:36:19 +0800 Subject: [PATCH] Remove unnecessary code. lazyAssign seems to fix all (noalias, initialization, etc.) --- Eigen/src/Core/NoAlias.h | 4 ---- .../Eigen/src/MatrixFunctions/MatrixPowerBase.h | 15 --------------- 2 files changed, 19 deletions(-) diff --git a/Eigen/src/Core/NoAlias.h b/Eigen/src/Core/NoAlias.h index ac1396f68..0112c865b 100644 --- a/Eigen/src/Core/NoAlias.h +++ b/Eigen/src/Core/NoAlias.h @@ -80,10 +80,6 @@ class NoAlias template EIGEN_STRONG_INLINE ExpressionType& operator-=(const CoeffBasedProduct& other) { return m_expression.derived() -= CoeffBasedProduct(other.lhs(), other.rhs()); } - - template - EIGEN_STRONG_INLINE ExpressionType& operator=(const MatrixPowerProductBase& other) - { other.derived().evalTo(m_expression); return m_expression; } #endif ExpressionType& expression() const diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h b/unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h index 28617ff6f..a809609d5 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h @@ -250,26 +250,11 @@ class MatrixPowerProductBase : public MatrixBase typedef MatrixBase Base; EIGEN_DENSE_PUBLIC_INTERFACE(MatrixPowerProductBase) - typedef typename Base::PlainObject PlainObject; - inline Index rows() const { return derived().rows(); } inline Index cols() const { return derived().cols(); } template inline void evalTo(ResultType& res) const { derived().evalTo(res); } - - const PlainObject& eval() const - { - m_result.resize(rows(), cols()); - derived().evalTo(m_result); - return m_result; - } - - operator const PlainObject&() const - { return eval(); } - - protected: - mutable PlainObject m_result; }; template