mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-29 23:34:12 +08:00
Move unshared items back to MatrixPower
This commit is contained in:
parent
73a0bfe261
commit
3b88216d42
@ -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();
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user