aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported
diff options
context:
space:
mode:
authorGravatar Chen-Pang He <jdh8@ms63.hinet.net>2012-09-27 17:19:32 +0800
committerGravatar Chen-Pang He <jdh8@ms63.hinet.net>2012-09-27 17:19:32 +0800
commit3b88216d42756cc2f73b841180c68f37e649823a (patch)
tree2216e2d5ce11895381be1fcb005da58e124d36d4 /unsupported
parent73a0bfe261bef6d987829d391b2eb44a412d3884 (diff)
Move unshared items back to MatrixPower
Diffstat (limited to 'unsupported')
-rw-r--r--unsupported/Eigen/src/MatrixFunctions/MatrixPower.h11
-rw-r--r--unsupported/Eigen/src/MatrixFunctions/MatrixPowerBase.h12
2 files changed, 11 insertions, 12 deletions
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<MatrixPower<MatrixType>,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<std::complex<RealScalar>,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<MatrixType>::Base::RealScalar MatrixPower<MatrixType>::modf
m_U = schurOfA.matrixU();
m_init = true;
- const RealArray absTdiag = m_T.diagonal().array().abs();
+ const Array<RealScalar,Rows,1,ColMajor,MaxRows> 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<MatrixType,UpLo>::computeBig(MatrixType& res, R
#define EIGEN_MATRIX_POWER_PUBLIC_INTERFACE(Derived) \
typedef MatrixPowerBase<Derived<MatrixType>,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<Derived, Lhs, Rhs> Base; \
@@ -257,17 +255,9 @@ template<typename Derived, typename MatrixType>
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<std::complex<RealScalar>,Rows,Cols,Options,MaxRows,MaxCols> ComplexMatrix;
- typedef Array<RealScalar,Rows,1,ColMajor,MaxRows> RealArray;
const MatrixType& m_A;
const bool m_del; // whether to delete the pointer at destruction