From abc8c010807f0706b80bc0ef13303b6485473a57 Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Sat, 20 Feb 2010 15:53:57 +0100 Subject: [PATCH] Renamed PlainMatrixType to PlainObject (Array != Matrix). Renamed ReturnByValue::ReturnMatrixType ReturnByValue::ReturnType (again, Array != Matrix). --- Eigen/src/Array/Array.h | 2 +- Eigen/src/Array/ArrayBase.h | 4 +-- Eigen/src/Array/VectorwiseOp.h | 2 +- Eigen/src/Cholesky/LDLT.h | 2 +- Eigen/src/Cholesky/LLT.h | 8 ++--- Eigen/src/Core/DenseStorageBase.h | 10 +++--- Eigen/src/Core/Dot.h | 2 +- Eigen/src/Core/EigenBase.h | 6 ++-- Eigen/src/Core/Flagged.h | 2 +- Eigen/src/Core/Matrix.h | 2 +- Eigen/src/Core/MatrixBase.h | 31 +++++++++---------- Eigen/src/Core/PermutationMatrix.h | 2 +- Eigen/src/Core/ProductBase.h | 14 ++++----- Eigen/src/Core/ReturnByValue.h | 16 +++++----- Eigen/src/Core/SelfAdjointView.h | 6 ++-- Eigen/src/Core/SelfCwiseBinaryOp.h | 8 ++--- Eigen/src/Core/TriangularMatrix.h | 2 +- Eigen/src/Core/products/CoeffBasedProduct.h | 14 ++++----- Eigen/src/Core/util/BlasUtil.h | 4 +-- Eigen/src/Core/util/XprHelper.h | 6 ++-- Eigen/src/Eigen2Support/TriangularSolver.h | 2 +- .../src/Eigenvalues/SelfAdjointEigenSolver.h | 4 +-- Eigen/src/Geometry/Homogeneous.h | 8 ++--- Eigen/src/Geometry/OrthoMethods.h | 6 ++-- Eigen/src/Householder/Householder.h | 4 +-- Eigen/src/LU/FullPivLU.h | 6 ++-- Eigen/src/LU/Inverse.h | 4 +-- Eigen/src/LU/PartialPivLU.h | 8 ++--- Eigen/src/QR/ColPivHouseholderQR.h | 8 ++--- Eigen/src/QR/FullPivHouseholderQR.h | 6 ++-- Eigen/src/QR/HouseholderQR.h | 6 ++-- Eigen/src/SVD/SVD.h | 4 +-- Eigen/src/SVD/UpperBidiagonalization.h | 4 +-- Eigen/src/Sparse/SparseMatrixBase.h | 4 +-- Eigen/src/Sparse/SparseSelfAdjointView.h | 4 +-- Eigen/src/misc/Image.h | 2 +- Eigen/src/misc/Kernel.h | 2 +- Eigen/src/misc/Solve.h | 4 +-- disabled/SkylineMatrix.h | 6 ++-- test/lu.cpp | 4 +-- .../src/MatrixFunctions/MatrixExponential.h | 4 +-- .../src/MatrixFunctions/MatrixFunction.h | 4 +-- 42 files changed, 123 insertions(+), 124 deletions(-) diff --git a/Eigen/src/Array/Array.h b/Eigen/src/Array/Array.h index 77d0c41ac..5a398d849 100644 --- a/Eigen/src/Array/Array.h +++ b/Eigen/src/Array/Array.h @@ -41,7 +41,7 @@ class Array EIGEN_DENSE_PUBLIC_INTERFACE(Array) enum { Options = _Options }; - typedef typename Base::PlainMatrixType PlainMatrixType; + typedef typename Base::PlainObject PlainObject; protected: using Base::m_storage; diff --git a/Eigen/src/Array/ArrayBase.h b/Eigen/src/Array/ArrayBase.h index 21f6fefb1..97807e5fc 100644 --- a/Eigen/src/Array/ArrayBase.h +++ b/Eigen/src/Array/ArrayBase.h @@ -97,7 +97,7 @@ template class ArrayBase /** \internal the plain matrix type corresponding to this expression. Note that is not necessarily * exactly the return type of eval(): in the case of plain matrices, the return type of eval() is a const * reference to a matrix, not a matrix! It is however guaranteed that the return type of eval() is either - * PlainMatrixType or const PlainMatrixType&. + * PlainObject or const PlainObject&. */ typedef Array::Scalar, ei_traits::RowsAtCompileTime, @@ -105,7 +105,7 @@ template class ArrayBase AutoAlign | (ei_traits::Flags&RowMajorBit ? RowMajor : ColMajor), ei_traits::MaxRowsAtCompileTime, ei_traits::MaxColsAtCompileTime - > PlainMatrixType; + > PlainObject; /** \internal Represents a matrix with all coefficients equal to one another*/ diff --git a/Eigen/src/Array/VectorwiseOp.h b/Eigen/src/Array/VectorwiseOp.h index 697a07d32..06d999b14 100644 --- a/Eigen/src/Array/VectorwiseOp.h +++ b/Eigen/src/Array/VectorwiseOp.h @@ -462,7 +462,7 @@ template class VectorwiseOp const Homogeneous homogeneous() const; - typedef typename ExpressionType::PlainMatrixType CrossReturnType; + typedef typename ExpressionType::PlainObject CrossReturnType; template const CrossReturnType cross(const MatrixBase& other) const; diff --git a/Eigen/src/Cholesky/LDLT.h b/Eigen/src/Cholesky/LDLT.h index b794b0c43..ceb818f19 100644 --- a/Eigen/src/Cholesky/LDLT.h +++ b/Eigen/src/Cholesky/LDLT.h @@ -319,7 +319,7 @@ bool LDLT::solveInPlace(MatrixBase &bAndX) const * \returns the Cholesky decomposition with full pivoting without square root of \c *this */ template -inline const LDLT::PlainMatrixType> +inline const LDLT::PlainObject> MatrixBase::ldlt() const { return derived(); diff --git a/Eigen/src/Cholesky/LLT.h b/Eigen/src/Cholesky/LLT.h index 8a149a316..474b82406 100644 --- a/Eigen/src/Cholesky/LLT.h +++ b/Eigen/src/Cholesky/LLT.h @@ -299,20 +299,20 @@ bool LLT::solveInPlace(MatrixBase &bAndX) const * \returns the LLT decomposition of \c *this */ template -inline const LLT::PlainMatrixType> +inline const LLT::PlainObject> MatrixBase::llt() const { - return LLT(derived()); + return LLT(derived()); } /** \cholesky_module * \returns the LLT decomposition of \c *this */ template -inline const LLT::PlainMatrixType, UpLo> +inline const LLT::PlainObject, UpLo> SelfAdjointView::llt() const { - return LLT(m_matrix); + return LLT(m_matrix); } #endif // EIGEN_LLT_H diff --git a/Eigen/src/Core/DenseStorageBase.h b/Eigen/src/Core/DenseStorageBase.h index 530ddcd07..6245b8007 100644 --- a/Eigen/src/Core/DenseStorageBase.h +++ b/Eigen/src/Core/DenseStorageBase.h @@ -44,7 +44,7 @@ class DenseStorageBase : public _Base public: enum { Options = _Options }; typedef _Base Base; - typedef typename Base::PlainMatrixType PlainMatrixType; + typedef typename Base::PlainObject PlainObject; typedef typename Base::Scalar Scalar; typedef typename Base::PacketScalar PacketScalar; using Base::RowsAtCompileTime; @@ -544,7 +544,7 @@ struct ei_conservative_resize_like_impl { if (_this.rows() == rows && _this.cols() == cols) return; EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived) - typename Derived::PlainMatrixType tmp(rows,cols); + typename Derived::PlainObject tmp(rows,cols); const int common_rows = std::min(rows, _this.rows()); const int common_cols = std::min(cols, _this.cols()); tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols); @@ -563,7 +563,7 @@ struct ei_conservative_resize_like_impl EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(Derived) EIGEN_STATIC_ASSERT_DYNAMIC_SIZE(OtherDerived) - typename Derived::PlainMatrixType tmp(other); + typename Derived::PlainObject tmp(other); const int common_rows = std::min(tmp.rows(), _this.rows()); const int common_cols = std::min(tmp.cols(), _this.cols()); tmp.block(0,0,common_rows,common_cols) = _this.block(0,0,common_rows,common_cols); @@ -577,7 +577,7 @@ struct ei_conservative_resize_like_impl static void run(DenseBase& _this, int size) { if (_this.size() == size) return; - typename Derived::PlainMatrixType tmp(size); + typename Derived::PlainObject tmp(size); const int common_size = std::min(_this.size(),size); tmp.segment(0,common_size) = _this.segment(0,common_size); _this.derived().swap(tmp); @@ -588,7 +588,7 @@ struct ei_conservative_resize_like_impl if (_this.rows() == other.rows() && _this.cols() == other.cols()) return; // segment(...) will check whether Derived/OtherDerived are vectors! - typename Derived::PlainMatrixType tmp(other); + typename Derived::PlainObject tmp(other); const int common_size = std::min(_this.size(),tmp.size()); tmp.segment(0,common_size) = _this.segment(0,common_size); _this.derived().swap(tmp); diff --git a/Eigen/src/Core/Dot.h b/Eigen/src/Core/Dot.h index f0c520b1f..201bd23ca 100644 --- a/Eigen/src/Core/Dot.h +++ b/Eigen/src/Core/Dot.h @@ -299,7 +299,7 @@ inline typename NumTraits::Scalar>::Real MatrixBase< * \sa norm(), normalize() */ template -inline const typename MatrixBase::PlainMatrixType +inline const typename MatrixBase::PlainObject MatrixBase::normalized() const { typedef typename ei_nested::type Nested; diff --git a/Eigen/src/Core/EigenBase.h b/Eigen/src/Core/EigenBase.h index 8b302b663..cf1ce4376 100644 --- a/Eigen/src/Core/EigenBase.h +++ b/Eigen/src/Core/EigenBase.h @@ -37,7 +37,7 @@ */ template struct EigenBase { -// typedef typename ei_plain_matrix_type::type PlainMatrixType; +// typedef typename ei_plain_matrix_type::type PlainObject; /** \returns a reference to the derived object */ Derived& derived() { return *static_cast(this); } @@ -61,7 +61,7 @@ template struct EigenBase { // This is the default implementation, // derived class can reimplement it in a more optimized way. - typename Dest::PlainMatrixType res(rows(),cols()); + typename Dest::PlainObject res(rows(),cols()); evalTo(res); dst += res; } @@ -71,7 +71,7 @@ template struct EigenBase { // This is the default implementation, // derived class can reimplement it in a more optimized way. - typename Dest::PlainMatrixType res(rows(),cols()); + typename Dest::PlainObject res(rows(),cols()); evalTo(res); dst -= res; } diff --git a/Eigen/src/Core/Flagged.h b/Eigen/src/Core/Flagged.h index 7f42a1e73..0044fe7cb 100644 --- a/Eigen/src/Core/Flagged.h +++ b/Eigen/src/Core/Flagged.h @@ -109,7 +109,7 @@ template clas const ExpressionType& _expression() const { return m_matrix; } template - typename ExpressionType::PlainMatrixType solveTriangular(const MatrixBase& other) const; + typename ExpressionType::PlainObject solveTriangular(const MatrixBase& other) const; template void solveTriangularInPlace(const MatrixBase& other) const; diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 1c43340a6..44a0ef7d1 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -139,7 +139,7 @@ class Matrix EIGEN_DENSE_PUBLIC_INTERFACE(Matrix) - typedef typename Base::PlainMatrixType PlainMatrixType; + typedef typename Base::PlainObject PlainObject; enum { NeedsToAlign = (!(Options&DontAlign)) && SizeAtCompileTime!=Dynamic && ((sizeof(Scalar)*SizeAtCompileTime)%16)==0 }; diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index 122a2271b..9c62163ba 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -121,7 +121,7 @@ template class MatrixBase * * This is not necessarily exactly the return type of eval(). In the case of plain matrices, * the return type of eval() is a const reference to a matrix, not a matrix! It is however guaranteed - * that the return type of eval() is either PlainMatrixType or const PlainMatrixType&. + * that the return type of eval() is either PlainObject or const PlainObject&. */ typedef Matrix::Scalar, ei_traits::RowsAtCompileTime, @@ -129,8 +129,7 @@ template class MatrixBase AutoAlign | (ei_traits::Flags&RowMajorBit ? RowMajor : ColMajor), ei_traits::MaxRowsAtCompileTime, ei_traits::MaxColsAtCompileTime - > PlainMatrixType; - // typedef typename ei_plain_matrix_type::type PlainMatrixType; + > PlainObject; #ifndef EIGEN_PARSED_BY_DOXYGEN /** \internal Represents a matrix with all coefficients equal to one another*/ @@ -212,7 +211,7 @@ template class MatrixBase RealScalar stableNorm() const; RealScalar blueNorm() const; RealScalar hypotNorm() const; - const PlainMatrixType normalized() const; + const PlainObject normalized() const; void normalize(); const AdjointReturnType adjoint() const; @@ -301,9 +300,9 @@ template class MatrixBase /////////// LU module /////////// - const FullPivLU fullPivLu() const; - const PartialPivLU partialPivLu() const; - const PartialPivLU lu() const; + const FullPivLU fullPivLu() const; + const PartialPivLU partialPivLu() const; + const PartialPivLU lu() const; const ei_inverse_impl inverse() const; template void computeInverseAndDetWithCheck( @@ -322,29 +321,29 @@ template class MatrixBase /////////// Cholesky module /////////// - const LLT llt() const; - const LDLT ldlt() const; + const LLT llt() const; + const LDLT ldlt() const; /////////// QR module /////////// - const HouseholderQR householderQr() const; - const ColPivHouseholderQR colPivHouseholderQr() const; - const FullPivHouseholderQR fullPivHouseholderQr() const; + const HouseholderQR householderQr() const; + const ColPivHouseholderQR colPivHouseholderQr() const; + const FullPivHouseholderQR fullPivHouseholderQr() const; EigenvaluesReturnType eigenvalues() const; RealScalar operatorNorm() const; /////////// SVD module /////////// - SVD svd() const; + SVD svd() const; /////////// Geometry module /////////// template - PlainMatrixType cross(const MatrixBase& other) const; + PlainObject cross(const MatrixBase& other) const; template - PlainMatrixType cross3(const MatrixBase& other) const; - PlainMatrixType unitOrthogonal(void) const; + PlainObject cross3(const MatrixBase& other) const; + PlainObject unitOrthogonal(void) const; Matrix eulerAngles(int a0, int a1, int a2) const; const ScalarMultipleReturnType operator*(const UniformScaling& s) const; enum { diff --git a/Eigen/src/Core/PermutationMatrix.h b/Eigen/src/Core/PermutationMatrix.h index 2d97c9c38..fcd2e46cc 100644 --- a/Eigen/src/Core/PermutationMatrix.h +++ b/Eigen/src/Core/PermutationMatrix.h @@ -280,7 +280,7 @@ operator*(const PermutationMatrix &perm template struct ei_traits > { - typedef typename MatrixType::PlainMatrixType ReturnMatrixType; + typedef typename MatrixType::PlainObject ReturnType; }; template diff --git a/Eigen/src/Core/ProductBase.h b/Eigen/src/Core/ProductBase.h index 481e7c760..789aecfb6 100644 --- a/Eigen/src/Core/ProductBase.h +++ b/Eigen/src/Core/ProductBase.h @@ -88,7 +88,7 @@ class ProductBase : public MatrixBase public: - typedef typename Base::PlainMatrixType PlainMatrixType; + typedef typename Base::PlainObject PlainObject; ProductBase(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) @@ -116,8 +116,8 @@ class ProductBase : public MatrixBase const _LhsNested& lhs() const { return m_lhs; } const _RhsNested& rhs() const { return m_rhs; } - // Implicit convertion to the nested type (trigger the evaluation of the product) - operator const PlainMatrixType& () const + // Implicit conversion to the nested type (trigger the evaluation of the product) + operator const PlainObject& () const { m_result.resize(m_lhs.rows(), m_rhs.cols()); this->evalTo(m_result); @@ -139,7 +139,7 @@ class ProductBase : public MatrixBase const LhsNested m_lhs; const RhsNested m_rhs; - mutable PlainMatrixType m_result; + mutable PlainObject m_result; private: @@ -152,10 +152,10 @@ class ProductBase : public MatrixBase // here we need to overload the nested rule for products // such that the nested type is a const reference to a plain matrix -template -struct ei_nested, N, PlainMatrixType> +template +struct ei_nested, N, PlainObject> { - typedef PlainMatrixType const& type; + typedef PlainObject const& type; }; template diff --git a/Eigen/src/Core/ReturnByValue.h b/Eigen/src/Core/ReturnByValue.h index 920269365..d375f0b5c 100644 --- a/Eigen/src/Core/ReturnByValue.h +++ b/Eigen/src/Core/ReturnByValue.h @@ -31,7 +31,7 @@ */ template struct ei_traits > - : public ei_traits::ReturnMatrixType> + : public ei_traits::ReturnType> { enum { // FIXME had to remove the DirectAccessBit for usage like @@ -42,7 +42,7 @@ struct ei_traits > // The fact that I had to do that shows that when doing xpr.block() with a non-direct-access xpr, // even if xpr has the EvalBeforeNestingBit, the block() doesn't use direct access on the evaluated // xpr. - Flags = (ei_traits::ReturnMatrixType>::Flags + Flags = (ei_traits::ReturnType>::Flags | EvalBeforeNestingBit) & ~DirectAccessBit }; }; @@ -51,18 +51,18 @@ struct ei_traits > * So the only way that nesting it in an expression can work, is by evaluating it into a plain matrix. * So ei_nested always gives the plain return matrix type. */ -template -struct ei_nested, n, PlainMatrixType> +template +struct ei_nested, n, PlainObject> { - typedef typename ei_traits::ReturnMatrixType type; + typedef typename ei_traits::ReturnType type; }; template class ReturnByValue - : public ei_traits::ReturnMatrixType::template MakeBase >::Type + : public ei_traits::ReturnType::template MakeBase >::Type { public: - typedef typename ei_traits::ReturnMatrixType ReturnMatrixType; - typedef typename ReturnMatrixType::template MakeBase >::Type Base; + typedef typename ei_traits::ReturnType ReturnType; + typedef typename ReturnType::template MakeBase >::Type Base; EIGEN_DENSE_PUBLIC_INTERFACE(ReturnByValue) template diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h index 6d01ee495..c3c5b17ff 100644 --- a/Eigen/src/Core/SelfAdjointView.h +++ b/Eigen/src/Core/SelfAdjointView.h @@ -68,7 +68,7 @@ template class SelfAdjointView enum { Mode = ei_traits::Mode }; - typedef typename MatrixType::PlainMatrixType PlainMatrixType; + typedef typename MatrixType::PlainObject PlainObject; inline SelfAdjointView(const MatrixType& matrix) : m_matrix(matrix) { ei_assert(ei_are_flags_consistent::ret); } @@ -146,8 +146,8 @@ template class SelfAdjointView /////////// Cholesky module /////////// - const LLT llt() const; - const LDLT ldlt() const; + const LLT llt() const; + const LDLT ldlt() const; protected: const typename MatrixType::Nested m_matrix; diff --git a/Eigen/src/Core/SelfCwiseBinaryOp.h b/Eigen/src/Core/SelfCwiseBinaryOp.h index 7ae2e82a4..d2690b66b 100644 --- a/Eigen/src/Core/SelfCwiseBinaryOp.h +++ b/Eigen/src/Core/SelfCwiseBinaryOp.h @@ -124,8 +124,8 @@ template inline Derived& DenseBase::operator*=(const Scalar& other) { SelfCwiseBinaryOp, Derived> tmp(derived()); - typedef typename Derived::PlainMatrixType PlainMatrixType; - tmp = PlainMatrixType::Constant(rows(),cols(),other); + typedef typename Derived::PlainObject PlainObject; + tmp = PlainObject::Constant(rows(),cols(),other); return derived(); } @@ -133,8 +133,8 @@ template inline Derived& DenseBase::operator/=(const Scalar& other) { SelfCwiseBinaryOp::HasFloatingPoint,ei_scalar_product_op,ei_scalar_quotient_op >::ret, Derived> tmp(derived()); - typedef typename Derived::PlainMatrixType PlainMatrixType; - tmp = PlainMatrixType::Constant(rows(),cols(), NumTraits::HasFloatingPoint ? Scalar(1)/other : other); + typedef typename Derived::PlainObject PlainObject; + tmp = PlainObject::Constant(rows(),cols(), NumTraits::HasFloatingPoint ? Scalar(1)/other : other); return derived(); } diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index 859f10298..7d978b800 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -148,7 +148,7 @@ template class TriangularView typedef TriangularBase Base; typedef typename ei_traits::Scalar Scalar; typedef _MatrixType MatrixType; - typedef typename MatrixType::PlainMatrixType DenseMatrixType; + typedef typename MatrixType::PlainObject DenseMatrixType; typedef typename MatrixType::Nested MatrixTypeNested; typedef typename ei_cleantype::type _MatrixTypeNested; diff --git a/Eigen/src/Core/products/CoeffBasedProduct.h b/Eigen/src/Core/products/CoeffBasedProduct.h index f030d59b5..3343b1875 100644 --- a/Eigen/src/Core/products/CoeffBasedProduct.h +++ b/Eigen/src/Core/products/CoeffBasedProduct.h @@ -109,7 +109,7 @@ class CoeffBasedProduct typedef MatrixBase Base; EIGEN_DENSE_PUBLIC_INTERFACE(CoeffBasedProduct) - typedef typename Base::PlainMatrixType PlainMatrixType; + typedef typename Base::PlainObject PlainObject; private: @@ -181,8 +181,8 @@ class CoeffBasedProduct return res; } - // Implicit convertion to the nested type (trigger the evaluation of the product) - operator const PlainMatrixType& () const + // Implicit conversion to the nested type (trigger the evaluation of the product) + operator const PlainObject& () const { m_result.lazyAssign(*this); return m_result; @@ -205,15 +205,15 @@ class CoeffBasedProduct const LhsNested m_lhs; const RhsNested m_rhs; - mutable PlainMatrixType m_result; + mutable PlainObject m_result; }; // here we need to overload the nested rule for products // such that the nested type is a const reference to a plain matrix -template -struct ei_nested, N, PlainMatrixType> +template +struct ei_nested, N, PlainObject> { - typedef PlainMatrixType const& type; + typedef PlainObject const& type; }; /*************************************************************************** diff --git a/Eigen/src/Core/util/BlasUtil.h b/Eigen/src/Core/util/BlasUtil.h index 3777464dc..2ca463d5d 100644 --- a/Eigen/src/Core/util/BlasUtil.h +++ b/Eigen/src/Core/util/BlasUtil.h @@ -166,7 +166,7 @@ template struct ei_blas_traits }; typedef typename ei_meta_if::ret DirectLinearAccessType; static inline ExtractType extract(const XprType& x) { return x; } static inline Scalar extractScalarFactor(const XprType&) { return Scalar(1); } @@ -227,7 +227,7 @@ struct ei_blas_traits > typedef Transpose _ExtractType; typedef typename ei_meta_if::ret DirectLinearAccessType; enum { IsTransposed = Base::IsTransposed ? 0 : 1 diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 4884557e5..a54ddd155 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -147,7 +147,7 @@ template::StorageType> template struct ei_eval { typedef typename ei_plain_matrix_type::type type; -// typedef typename T::PlainMatrixType type; +// typedef typename T::PlainObject type; // typedef T::Matrix::Scalar, // ei_traits::RowsAtCompileTime, // ei_traits::ColsAtCompileTime, @@ -256,7 +256,7 @@ struct ei_ref_selector * const Matrix3d&, because the internal logic of ei_nested determined that since a was already a matrix, there was no point * in copying it into another matrix. */ -template::type> struct ei_nested +template::type> struct ei_nested { enum { CostEval = (n+1) * int(NumTraits::Scalar>::ReadCost), @@ -266,7 +266,7 @@ template::ty typedef typename ei_meta_if< ( int(ei_traits::Flags) & EvalBeforeNestingBit ) || ( int(CostEval) <= int(CostNoEval) ), - PlainMatrixType, + PlainObject, typename ei_ref_selector::type >::ret type; }; diff --git a/Eigen/src/Eigen2Support/TriangularSolver.h b/Eigen/src/Eigen2Support/TriangularSolver.h index 94b92577e..833dd58d2 100644 --- a/Eigen/src/Eigen2Support/TriangularSolver.h +++ b/Eigen/src/Eigen2Support/TriangularSolver.h @@ -37,7 +37,7 @@ const unsigned int UnitLowerTriangular = UnitLower; template template -typename ExpressionType::PlainMatrixType +typename ExpressionType::PlainObject Flagged::solveTriangular(const MatrixBase& other) const { return m_matrix.template triangularView.solve(other.derived()); diff --git a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h index 960e9b417..e8e9bea97 100644 --- a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +++ b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h @@ -276,7 +276,7 @@ inline Matrix::Scalar>::Real, ei_ MatrixBase::eigenvalues() const { ei_assert(Flags&SelfAdjoint); - return SelfAdjointEigenSolver(eval(),false).eigenvalues(); + return SelfAdjointEigenSolver(eval(),false).eigenvalues(); } template @@ -296,7 +296,7 @@ template struct ei_operatorNorm_selector static inline typename NumTraits::Scalar>::Real operatorNorm(const MatrixBase& m) { - typename Derived::PlainMatrixType m_eval(m); + typename Derived::PlainObject m_eval(m); // FIXME if it is really guaranteed that the eigenvalues are already sorted, // then we don't need to compute a maxCoeff() here, comparing the 1st and last ones is enough. return ei_sqrt( diff --git a/Eigen/src/Geometry/Homogeneous.h b/Eigen/src/Geometry/Homogeneous.h index 76ca66c57..2b8b9cf8e 100644 --- a/Eigen/src/Geometry/Homogeneous.h +++ b/Eigen/src/Geometry/Homogeneous.h @@ -213,9 +213,9 @@ struct ei_traits::Scalar, Lhs::RowsAtCompileTime, MatrixType::ColsAtCompileTime, - MatrixType::PlainMatrixType::Options, + MatrixType::PlainObject::Options, Lhs::MaxRowsAtCompileTime, - MatrixType::MaxColsAtCompileTime> ReturnMatrixType; + MatrixType::MaxColsAtCompileTime> ReturnType; }; template @@ -251,9 +251,9 @@ struct ei_traits::Scalar, MatrixType::RowsAtCompileTime, Rhs::ColsAtCompileTime, - MatrixType::PlainMatrixType::Options, + MatrixType::PlainObject::Options, MatrixType::MaxRowsAtCompileTime, - Rhs::MaxColsAtCompileTime> ReturnMatrixType; + Rhs::MaxColsAtCompileTime> ReturnType; }; template diff --git a/Eigen/src/Geometry/OrthoMethods.h b/Eigen/src/Geometry/OrthoMethods.h index c10b6abf4..265507eb9 100644 --- a/Eigen/src/Geometry/OrthoMethods.h +++ b/Eigen/src/Geometry/OrthoMethods.h @@ -35,7 +35,7 @@ */ template template -inline typename MatrixBase::PlainMatrixType +inline typename MatrixBase::PlainObject MatrixBase::cross(const MatrixBase& other) const { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,3) @@ -79,7 +79,7 @@ struct ei_cross3_impl { */ template template -inline typename MatrixBase::PlainMatrixType +inline typename MatrixBase::PlainObject MatrixBase::cross3(const MatrixBase& other) const { EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,4) @@ -210,7 +210,7 @@ struct ei_unitOrthogonal_selector * \sa cross() */ template -typename MatrixBase::PlainMatrixType +typename MatrixBase::PlainObject MatrixBase::unitOrthogonal() const { EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived) diff --git a/Eigen/src/Householder/Householder.h b/Eigen/src/Householder/Householder.h index d86e287fa..9d1383543 100644 --- a/Eigen/src/Householder/Householder.h +++ b/Eigen/src/Householder/Householder.h @@ -99,7 +99,7 @@ void MatrixBase::applyHouseholderOnTheLeft( const Scalar& tau, Scalar* workspace) { - Map > tmp(workspace,cols()); + Map > tmp(workspace,cols()); Block bottom(derived(), 1, 0, rows()-1, cols()); tmp.noalias() = essential.adjoint() * bottom; tmp += this->row(0); @@ -114,7 +114,7 @@ void MatrixBase::applyHouseholderOnTheRight( const Scalar& tau, Scalar* workspace) { - Map > tmp(workspace,rows()); + Map > tmp(workspace,rows()); Block right(derived(), 0, 1, rows(), cols()-1); tmp.noalias() = right * essential.conjugate(); tmp += this->col(0); diff --git a/Eigen/src/LU/FullPivLU.h b/Eigen/src/LU/FullPivLU.h index 72e878223..1129293d5 100644 --- a/Eigen/src/LU/FullPivLU.h +++ b/Eigen/src/LU/FullPivLU.h @@ -630,7 +630,7 @@ struct ei_solve_retval, Rhs> return; } - typename Rhs::PlainMatrixType c(rhs().rows(), rhs().cols()); + typename Rhs::PlainObject c(rhs().rows(), rhs().cols()); // Step 1 c = dec().permutationP() * rhs(); @@ -670,10 +670,10 @@ struct ei_solve_retval, Rhs> * \sa class FullPivLU */ template -inline const FullPivLU::PlainMatrixType> +inline const FullPivLU::PlainObject> MatrixBase::fullPivLu() const { - return FullPivLU(eval()); + return FullPivLU(eval()); } #endif // EIGEN_LU_H diff --git a/Eigen/src/LU/Inverse.h b/Eigen/src/LU/Inverse.h index 36392c8d8..e20da70d6 100644 --- a/Eigen/src/LU/Inverse.h +++ b/Eigen/src/LU/Inverse.h @@ -238,7 +238,7 @@ struct ei_compute_inverse_and_det_with_check template struct ei_traits > { - typedef typename MatrixType::PlainMatrixType ReturnMatrixType; + typedef typename MatrixType::PlainObject ReturnType; }; template @@ -327,7 +327,7 @@ inline void MatrixBase::computeInverseAndDetWithCheck( typedef typename ei_meta_if< RowsAtCompileTime == 2, typename ei_cleantype::type>::type, - PlainMatrixType + PlainObject >::ret MatrixType; ei_compute_inverse_and_det_with_check::run (derived(), absDeterminantThreshold, inverse, determinant, invertible); diff --git a/Eigen/src/LU/PartialPivLU.h b/Eigen/src/LU/PartialPivLU.h index 809e4aad6..ed2354d78 100644 --- a/Eigen/src/LU/PartialPivLU.h +++ b/Eigen/src/LU/PartialPivLU.h @@ -442,10 +442,10 @@ struct ei_solve_retval, Rhs> * \sa class PartialPivLU */ template -inline const PartialPivLU::PlainMatrixType> +inline const PartialPivLU::PlainObject> MatrixBase::partialPivLu() const { - return PartialPivLU(eval()); + return PartialPivLU(eval()); } /** \lu_module @@ -457,10 +457,10 @@ MatrixBase::partialPivLu() const * \sa class PartialPivLU */ template -inline const PartialPivLU::PlainMatrixType> +inline const PartialPivLU::PlainObject> MatrixBase::lu() const { - return PartialPivLU(eval()); + return PartialPivLU(eval()); } #endif // EIGEN_PARTIALLU_H diff --git a/Eigen/src/QR/ColPivHouseholderQR.h b/Eigen/src/QR/ColPivHouseholderQR.h index bf28605dd..1219f1918 100644 --- a/Eigen/src/QR/ColPivHouseholderQR.h +++ b/Eigen/src/QR/ColPivHouseholderQR.h @@ -441,7 +441,7 @@ struct ei_solve_retval, Rhs> return; } - typename Rhs::PlainMatrixType c(rhs()); + typename Rhs::PlainObject c(rhs()); // Note that the matrix Q = H_0^* H_1^*... so its inverse is Q^* = (H_0 H_1 ...)^T c.applyOnTheLeft(householderSequence( @@ -458,7 +458,7 @@ struct ei_solve_retval, Rhs> .solveInPlace(c.corner(TopLeft, nonzero_pivots, c.cols())); - typename Rhs::PlainMatrixType d(c); + typename Rhs::PlainObject d(c); d.corner(TopLeft, nonzero_pivots, c.cols()) = dec().matrixQR() .corner(TopLeft, nonzero_pivots, nonzero_pivots) @@ -486,10 +486,10 @@ typename ColPivHouseholderQR::HouseholderSequenceType ColPivHousehol * \sa class ColPivHouseholderQR */ template -const ColPivHouseholderQR::PlainMatrixType> +const ColPivHouseholderQR::PlainObject> MatrixBase::colPivHouseholderQr() const { - return ColPivHouseholderQR(eval()); + return ColPivHouseholderQR(eval()); } diff --git a/Eigen/src/QR/FullPivHouseholderQR.h b/Eigen/src/QR/FullPivHouseholderQR.h index 1ec60aeaf..07be47f47 100644 --- a/Eigen/src/QR/FullPivHouseholderQR.h +++ b/Eigen/src/QR/FullPivHouseholderQR.h @@ -352,7 +352,7 @@ struct ei_solve_retval, Rhs> return; } - typename Rhs::PlainMatrixType c(rhs()); + typename Rhs::PlainObject c(rhs()); Matrix temp(rhs().cols()); for (int k = 0; k < dec().rank(); ++k) @@ -413,10 +413,10 @@ typename FullPivHouseholderQR::MatrixQType FullPivHouseholderQR -const FullPivHouseholderQR::PlainMatrixType> +const FullPivHouseholderQR::PlainObject> MatrixBase::fullPivHouseholderQr() const { - return FullPivHouseholderQR(eval()); + return FullPivHouseholderQR(eval()); } #endif // EIGEN_FULLPIVOTINGHOUSEHOLDERQR_H diff --git a/Eigen/src/QR/HouseholderQR.h b/Eigen/src/QR/HouseholderQR.h index b6b07ea63..4709e4b77 100644 --- a/Eigen/src/QR/HouseholderQR.h +++ b/Eigen/src/QR/HouseholderQR.h @@ -221,7 +221,7 @@ struct ei_solve_retval, Rhs> const int rank = std::min(rows, cols); ei_assert(rhs().rows() == rows); - typename Rhs::PlainMatrixType c(rhs()); + typename Rhs::PlainObject c(rhs()); // Note that the matrix Q = H_0^* H_1^*... so its inverse is Q^* = (H_0 H_1 ...)^T c.applyOnTheLeft(householderSequence( @@ -246,10 +246,10 @@ struct ei_solve_retval, Rhs> * \sa class HouseholderQR */ template -const HouseholderQR::PlainMatrixType> +const HouseholderQR::PlainObject> MatrixBase::householderQr() const { - return HouseholderQR(eval()); + return HouseholderQR(eval()); } diff --git a/Eigen/src/SVD/SVD.h b/Eigen/src/SVD/SVD.h index c308ff3ee..fa3b82ce2 100644 --- a/Eigen/src/SVD/SVD.h +++ b/Eigen/src/SVD/SVD.h @@ -555,10 +555,10 @@ void SVD::computeScalingRotation(ScalingType *scaling, RotationType * \returns the SVD decomposition of \c *this */ template -inline SVD::PlainMatrixType> +inline SVD::PlainObject> MatrixBase::svd() const { - return SVD(derived()); + return SVD(derived()); } #endif // EIGEN_SVD_H diff --git a/Eigen/src/SVD/UpperBidiagonalization.h b/Eigen/src/SVD/UpperBidiagonalization.h index a2cb44733..0a63b4265 100644 --- a/Eigen/src/SVD/UpperBidiagonalization.h +++ b/Eigen/src/SVD/UpperBidiagonalization.h @@ -141,10 +141,10 @@ UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::comput * \sa class Bidiagonalization */ template -const UpperBidiagonalization::PlainMatrixType> +const UpperBidiagonalization::PlainObject> MatrixBase::bidiagonalization() const { - return UpperBidiagonalization(eval()); + return UpperBidiagonalization(eval()); } #endif diff --git a/Eigen/src/Sparse/SparseMatrixBase.h b/Eigen/src/Sparse/SparseMatrixBase.h index 7bf4ef836..cf1a5d7bf 100644 --- a/Eigen/src/Sparse/SparseMatrixBase.h +++ b/Eigen/src/Sparse/SparseMatrixBase.h @@ -109,7 +109,7 @@ template class SparseMatrixBase : public EigenBase Transpose >::ret AdjointReturnType; - typedef SparseMatrix PlainMatrixType; + typedef SparseMatrix PlainObject; #define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase #include "../plugins/CommonCwiseUnaryOps.h" @@ -396,7 +396,7 @@ template class SparseMatrixBase : public EigenBase template Scalar dot(const SparseMatrixBase& other) const; RealScalar squaredNorm() const; RealScalar norm() const; -// const PlainMatrixType normalized() const; +// const PlainObject normalized() const; // void normalize(); Transpose transpose() { return derived(); } diff --git a/Eigen/src/Sparse/SparseSelfAdjointView.h b/Eigen/src/Sparse/SparseSelfAdjointView.h index 039e5c725..f3d4fbcbd 100644 --- a/Eigen/src/Sparse/SparseSelfAdjointView.h +++ b/Eigen/src/Sparse/SparseSelfAdjointView.h @@ -93,8 +93,8 @@ template class SparseSelfAdjointView template SparseSelfAdjointView& rankUpdate(const MatrixBase& u, Scalar alpha = Scalar(1)); - // const SparseLLT llt() const; - // const SparseLDLT ldlt() const; + // const SparseLLT llt() const; + // const SparseLDLT ldlt() const; protected: diff --git a/Eigen/src/misc/Image.h b/Eigen/src/misc/Image.h index 2f39d6b9d..1d63d8143 100644 --- a/Eigen/src/misc/Image.h +++ b/Eigen/src/misc/Image.h @@ -40,7 +40,7 @@ struct ei_traits > MatrixType::Options, MatrixType::MaxRowsAtCompileTime, // the image matrix will consist of columns from the original matrix, MatrixType::MaxColsAtCompileTime // so it has the same number of rows and at most as many columns. - > ReturnMatrixType; + > ReturnType; }; template struct ei_image_retval_base diff --git a/Eigen/src/misc/Kernel.h b/Eigen/src/misc/Kernel.h index 908c408e9..497b42eab 100644 --- a/Eigen/src/misc/Kernel.h +++ b/Eigen/src/misc/Kernel.h @@ -42,7 +42,7 @@ struct ei_traits > MatrixType::MaxColsAtCompileTime, // see explanation for 2nd template parameter MatrixType::MaxColsAtCompileTime // the kernel is a subspace of the domain space, // whose dimension is the number of columns of the original matrix - > ReturnMatrixType; + > ReturnType; }; template struct ei_kernel_retval_base diff --git a/Eigen/src/misc/Solve.h b/Eigen/src/misc/Solve.h index 4ab0775fc..028716aa2 100644 --- a/Eigen/src/misc/Solve.h +++ b/Eigen/src/misc/Solve.h @@ -35,9 +35,9 @@ struct ei_traits > typedef Matrix ReturnMatrixType; + Rhs::MaxColsAtCompileTime> ReturnType; }; template struct ei_solve_retval_base diff --git a/disabled/SkylineMatrix.h b/disabled/SkylineMatrix.h index 03d17dac2..640f676bd 100644 --- a/disabled/SkylineMatrix.h +++ b/disabled/SkylineMatrix.h @@ -62,7 +62,7 @@ class BandMatrix : public MultiplierBase MaxColsAtCompileTime = ei_traits::MaxColsAtCompileTime }; typedef typename ei_traits::Scalar Scalar; - typedef Matrix PlainMatrixType; + typedef Matrix PlainObject; protected: enum { @@ -125,9 +125,9 @@ class BandMatrix : public MultiplierBase // inline VectorBlock subDiagonal() // { return VectorBlock(m_data,0,m_size.value()); } - PlainMatrixType toDense() const + PlainObject toDense() const { - PlainMatrixType res(rows(),cols()); + PlainObject res(rows(),cols()); res.setZero(); res.diagonal() = diagonal(); for (int i=1; i<=supers();++i) diff --git a/test/lu.cpp b/test/lu.cpp index 45308ff82..568db8230 100644 --- a/test/lu.cpp +++ b/test/lu.cpp @@ -51,8 +51,8 @@ template void lu_non_invertible() cols2 = cols = MatrixType::ColsAtCompileTime; } - typedef typename ei_kernel_retval_base >::ReturnMatrixType KernelMatrixType; - typedef typename ei_image_retval_base >::ReturnMatrixType ImageMatrixType; + typedef typename ei_kernel_retval_base >::ReturnType KernelMatrixType; + typedef typename ei_image_retval_base >::ReturnType ImageMatrixType; typedef Matrix DynamicMatrixType; typedef Matrix CMatrixType; diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h index 39c23cdc5..2c761e648 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixExponential.h @@ -313,7 +313,7 @@ template struct MatrixExponentialReturnValue inline void evalTo(ResultType& result) const { const typename ei_eval::type srcEvaluated = m_src.eval(); - MatrixExponential me(srcEvaluated); + MatrixExponential me(srcEvaluated); me.compute(result); } @@ -327,7 +327,7 @@ template struct MatrixExponentialReturnValue template struct ei_traits > { - typedef typename Derived::PlainMatrixType ReturnMatrixType; + typedef typename Derived::PlainObject ReturnType; }; /** \ingroup MatrixFunctions_Module diff --git a/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h b/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h index d63bcbce9..12322a256 100644 --- a/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h +++ b/unsupported/Eigen/src/MatrixFunctions/MatrixFunction.h @@ -516,7 +516,7 @@ template class MatrixFunctionReturnValue inline void evalTo(ResultType& result) const { const typename ei_eval::type Aevaluated = m_A.eval(); - MatrixFunction mf(Aevaluated, m_f); + MatrixFunction mf(Aevaluated, m_f); mf.compute(result); } @@ -531,7 +531,7 @@ template class MatrixFunctionReturnValue template struct ei_traits > { - typedef typename Derived::PlainMatrixType ReturnMatrixType; + typedef typename Derived::PlainObject ReturnType; };