Renamed PlainMatrixType to PlainObject (Array != Matrix).

Renamed ReturnByValue::ReturnMatrixType ReturnByValue::ReturnType (again, Array != Matrix).
This commit is contained in:
Hauke Heibel 2010-02-20 15:53:57 +01:00
parent f0c8dcf1e2
commit abc8c01080
42 changed files with 123 additions and 124 deletions

View File

@ -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;

View File

@ -97,7 +97,7 @@ template<typename Derived> 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<typename ei_traits<Derived>::Scalar,
ei_traits<Derived>::RowsAtCompileTime,
@ -105,7 +105,7 @@ template<typename Derived> class ArrayBase
AutoAlign | (ei_traits<Derived>::Flags&RowMajorBit ? RowMajor : ColMajor),
ei_traits<Derived>::MaxRowsAtCompileTime,
ei_traits<Derived>::MaxColsAtCompileTime
> PlainMatrixType;
> PlainObject;
/** \internal Represents a matrix with all coefficients equal to one another*/

View File

@ -462,7 +462,7 @@ template<typename ExpressionType, int Direction> class VectorwiseOp
const Homogeneous<ExpressionType,Direction> homogeneous() const;
typedef typename ExpressionType::PlainMatrixType CrossReturnType;
typedef typename ExpressionType::PlainObject CrossReturnType;
template<typename OtherDerived>
const CrossReturnType cross(const MatrixBase<OtherDerived>& other) const;

View File

@ -319,7 +319,7 @@ bool LDLT<MatrixType>::solveInPlace(MatrixBase<Derived> &bAndX) const
* \returns the Cholesky decomposition with full pivoting without square root of \c *this
*/
template<typename Derived>
inline const LDLT<typename MatrixBase<Derived>::PlainMatrixType>
inline const LDLT<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::ldlt() const
{
return derived();

View File

@ -299,20 +299,20 @@ bool LLT<MatrixType,_UpLo>::solveInPlace(MatrixBase<Derived> &bAndX) const
* \returns the LLT decomposition of \c *this
*/
template<typename Derived>
inline const LLT<typename MatrixBase<Derived>::PlainMatrixType>
inline const LLT<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::llt() const
{
return LLT<PlainMatrixType>(derived());
return LLT<PlainObject>(derived());
}
/** \cholesky_module
* \returns the LLT decomposition of \c *this
*/
template<typename MatrixType, unsigned int UpLo>
inline const LLT<typename SelfAdjointView<MatrixType, UpLo>::PlainMatrixType, UpLo>
inline const LLT<typename SelfAdjointView<MatrixType, UpLo>::PlainObject, UpLo>
SelfAdjointView<MatrixType, UpLo>::llt() const
{
return LLT<PlainMatrixType,UpLo>(m_matrix);
return LLT<PlainObject,UpLo>(m_matrix);
}
#endif // EIGEN_LLT_H

View File

@ -44,7 +44,7 @@ class DenseStorageBase : public _Base<Derived>
public:
enum { Options = _Options };
typedef _Base<Derived> 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<Derived,OtherDerived,true>
static void run(DenseBase<Derived>& _this, int size)
{
if (_this.size() == size) return;
typename Derived::PlainMatrixType tmp(size);
typename Derived::PlainObject tmp(size);
const int common_size = std::min<int>(_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<Derived,OtherDerived,true>
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<int>(_this.size(),tmp.size());
tmp.segment(0,common_size) = _this.segment(0,common_size);
_this.derived().swap(tmp);

View File

@ -299,7 +299,7 @@ inline typename NumTraits<typename ei_traits<Derived>::Scalar>::Real MatrixBase<
* \sa norm(), normalize()
*/
template<typename Derived>
inline const typename MatrixBase<Derived>::PlainMatrixType
inline const typename MatrixBase<Derived>::PlainObject
MatrixBase<Derived>::normalized() const
{
typedef typename ei_nested<Derived>::type Nested;

View File

@ -37,7 +37,7 @@
*/
template<typename Derived> struct EigenBase
{
// typedef typename ei_plain_matrix_type<Derived>::type PlainMatrixType;
// typedef typename ei_plain_matrix_type<Derived>::type PlainObject;
/** \returns a reference to the derived object */
Derived& derived() { return *static_cast<Derived*>(this); }
@ -61,7 +61,7 @@ template<typename Derived> 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<typename Derived> 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;
}

View File

@ -109,7 +109,7 @@ template<typename ExpressionType, unsigned int Added, unsigned int Removed> clas
const ExpressionType& _expression() const { return m_matrix; }
template<typename OtherDerived>
typename ExpressionType::PlainMatrixType solveTriangular(const MatrixBase<OtherDerived>& other) const;
typename ExpressionType::PlainObject solveTriangular(const MatrixBase<OtherDerived>& other) const;
template<typename OtherDerived>
void solveTriangularInPlace(const MatrixBase<OtherDerived>& other) const;

View File

@ -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 };

View File

@ -121,7 +121,7 @@ template<typename Derived> 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<typename ei_traits<Derived>::Scalar,
ei_traits<Derived>::RowsAtCompileTime,
@ -129,8 +129,7 @@ template<typename Derived> class MatrixBase
AutoAlign | (ei_traits<Derived>::Flags&RowMajorBit ? RowMajor : ColMajor),
ei_traits<Derived>::MaxRowsAtCompileTime,
ei_traits<Derived>::MaxColsAtCompileTime
> PlainMatrixType;
// typedef typename ei_plain_matrix_type<Derived>::type PlainMatrixType;
> PlainObject;
#ifndef EIGEN_PARSED_BY_DOXYGEN
/** \internal Represents a matrix with all coefficients equal to one another*/
@ -212,7 +211,7 @@ template<typename Derived> 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<typename Derived> class MatrixBase
/////////// LU module ///////////
const FullPivLU<PlainMatrixType> fullPivLu() const;
const PartialPivLU<PlainMatrixType> partialPivLu() const;
const PartialPivLU<PlainMatrixType> lu() const;
const FullPivLU<PlainObject> fullPivLu() const;
const PartialPivLU<PlainObject> partialPivLu() const;
const PartialPivLU<PlainObject> lu() const;
const ei_inverse_impl<Derived> inverse() const;
template<typename ResultType>
void computeInverseAndDetWithCheck(
@ -322,29 +321,29 @@ template<typename Derived> class MatrixBase
/////////// Cholesky module ///////////
const LLT<PlainMatrixType> llt() const;
const LDLT<PlainMatrixType> ldlt() const;
const LLT<PlainObject> llt() const;
const LDLT<PlainObject> ldlt() const;
/////////// QR module ///////////
const HouseholderQR<PlainMatrixType> householderQr() const;
const ColPivHouseholderQR<PlainMatrixType> colPivHouseholderQr() const;
const FullPivHouseholderQR<PlainMatrixType> fullPivHouseholderQr() const;
const HouseholderQR<PlainObject> householderQr() const;
const ColPivHouseholderQR<PlainObject> colPivHouseholderQr() const;
const FullPivHouseholderQR<PlainObject> fullPivHouseholderQr() const;
EigenvaluesReturnType eigenvalues() const;
RealScalar operatorNorm() const;
/////////// SVD module ///////////
SVD<PlainMatrixType> svd() const;
SVD<PlainObject> svd() const;
/////////// Geometry module ///////////
template<typename OtherDerived>
PlainMatrixType cross(const MatrixBase<OtherDerived>& other) const;
PlainObject cross(const MatrixBase<OtherDerived>& other) const;
template<typename OtherDerived>
PlainMatrixType cross3(const MatrixBase<OtherDerived>& other) const;
PlainMatrixType unitOrthogonal(void) const;
PlainObject cross3(const MatrixBase<OtherDerived>& other) const;
PlainObject unitOrthogonal(void) const;
Matrix<Scalar,3,1> eulerAngles(int a0, int a1, int a2) const;
const ScalarMultipleReturnType operator*(const UniformScaling<Scalar>& s) const;
enum {

View File

@ -280,7 +280,7 @@ operator*(const PermutationMatrix<SizeAtCompileTime, MaxSizeAtCompileTime> &perm
template<typename PermutationType, typename MatrixType, int Side>
struct ei_traits<ei_permut_matrix_product_retval<PermutationType, MatrixType, Side> >
{
typedef typename MatrixType::PlainMatrixType ReturnMatrixType;
typedef typename MatrixType::PlainObject ReturnType;
};
template<typename PermutationType, typename MatrixType, int Side>

View File

@ -88,7 +88,7 @@ class ProductBase : public MatrixBase<Derived>
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<Derived>
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<Derived>
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<Derived>
// here we need to overload the nested rule for products
// such that the nested type is a const reference to a plain matrix
template<typename Lhs, typename Rhs, int Mode, int N, typename PlainMatrixType>
struct ei_nested<GeneralProduct<Lhs,Rhs,Mode>, N, PlainMatrixType>
template<typename Lhs, typename Rhs, int Mode, int N, typename PlainObject>
struct ei_nested<GeneralProduct<Lhs,Rhs,Mode>, N, PlainObject>
{
typedef PlainMatrixType const& type;
typedef PlainObject const& type;
};
template<typename NestedProduct>

View File

@ -31,7 +31,7 @@
*/
template<typename Derived>
struct ei_traits<ReturnByValue<Derived> >
: public ei_traits<typename ei_traits<Derived>::ReturnMatrixType>
: public ei_traits<typename ei_traits<Derived>::ReturnType>
{
enum {
// FIXME had to remove the DirectAccessBit for usage like
@ -42,7 +42,7 @@ struct ei_traits<ReturnByValue<Derived> >
// 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<typename ei_traits<Derived>::ReturnMatrixType>::Flags
Flags = (ei_traits<typename ei_traits<Derived>::ReturnType>::Flags
| EvalBeforeNestingBit) & ~DirectAccessBit
};
};
@ -51,18 +51,18 @@ struct ei_traits<ReturnByValue<Derived> >
* 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<typename Derived,int n,typename PlainMatrixType>
struct ei_nested<ReturnByValue<Derived>, n, PlainMatrixType>
template<typename Derived,int n,typename PlainObject>
struct ei_nested<ReturnByValue<Derived>, n, PlainObject>
{
typedef typename ei_traits<Derived>::ReturnMatrixType type;
typedef typename ei_traits<Derived>::ReturnType type;
};
template<typename Derived> class ReturnByValue
: public ei_traits<Derived>::ReturnMatrixType::template MakeBase<ReturnByValue<Derived> >::Type
: public ei_traits<Derived>::ReturnType::template MakeBase<ReturnByValue<Derived> >::Type
{
public:
typedef typename ei_traits<Derived>::ReturnMatrixType ReturnMatrixType;
typedef typename ReturnMatrixType::template MakeBase<ReturnByValue<Derived> >::Type Base;
typedef typename ei_traits<Derived>::ReturnType ReturnType;
typedef typename ReturnType::template MakeBase<ReturnByValue<Derived> >::Type Base;
EIGEN_DENSE_PUBLIC_INTERFACE(ReturnByValue)
template<typename Dest>

View File

@ -68,7 +68,7 @@ template<typename MatrixType, unsigned int UpLo> class SelfAdjointView
enum {
Mode = ei_traits<SelfAdjointView>::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<Mode>::ret); }
@ -146,8 +146,8 @@ template<typename MatrixType, unsigned int UpLo> class SelfAdjointView
/////////// Cholesky module ///////////
const LLT<PlainMatrixType, UpLo> llt() const;
const LDLT<PlainMatrixType> ldlt() const;
const LLT<PlainObject, UpLo> llt() const;
const LDLT<PlainObject> ldlt() const;
protected:
const typename MatrixType::Nested m_matrix;

View File

@ -124,8 +124,8 @@ template<typename Derived>
inline Derived& DenseBase<Derived>::operator*=(const Scalar& other)
{
SelfCwiseBinaryOp<ei_scalar_product_op<Scalar>, 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<typename Derived>
inline Derived& DenseBase<Derived>::operator/=(const Scalar& other)
{
SelfCwiseBinaryOp<typename ei_meta_if<NumTraits<Scalar>::HasFloatingPoint,ei_scalar_product_op<Scalar>,ei_scalar_quotient_op<Scalar> >::ret, Derived> tmp(derived());
typedef typename Derived::PlainMatrixType PlainMatrixType;
tmp = PlainMatrixType::Constant(rows(),cols(), NumTraits<Scalar>::HasFloatingPoint ? Scalar(1)/other : other);
typedef typename Derived::PlainObject PlainObject;
tmp = PlainObject::Constant(rows(),cols(), NumTraits<Scalar>::HasFloatingPoint ? Scalar(1)/other : other);
return derived();
}

View File

@ -148,7 +148,7 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView
typedef TriangularBase<TriangularView> Base;
typedef typename ei_traits<TriangularView>::Scalar Scalar;
typedef _MatrixType MatrixType;
typedef typename MatrixType::PlainMatrixType DenseMatrixType;
typedef typename MatrixType::PlainObject DenseMatrixType;
typedef typename MatrixType::Nested MatrixTypeNested;
typedef typename ei_cleantype<MatrixTypeNested>::type _MatrixTypeNested;

View File

@ -109,7 +109,7 @@ class CoeffBasedProduct
typedef MatrixBase<CoeffBasedProduct> 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<typename Lhs, typename Rhs, int N, typename PlainMatrixType>
struct ei_nested<CoeffBasedProduct<Lhs,Rhs,EvalBeforeNestingBit|EvalBeforeAssigningBit>, N, PlainMatrixType>
template<typename Lhs, typename Rhs, int N, typename PlainObject>
struct ei_nested<CoeffBasedProduct<Lhs,Rhs,EvalBeforeNestingBit|EvalBeforeAssigningBit>, N, PlainObject>
{
typedef PlainMatrixType const& type;
typedef PlainObject const& type;
};
/***************************************************************************

View File

@ -166,7 +166,7 @@ template<typename XprType> struct ei_blas_traits
};
typedef typename ei_meta_if<int(ActualAccess)==HasDirectAccess,
ExtractType,
typename _ExtractType::PlainMatrixType
typename _ExtractType::PlainObject
>::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<Transpose<NestedXpr> >
typedef Transpose<typename Base::_ExtractType> _ExtractType;
typedef typename ei_meta_if<int(Base::ActualAccess)==HasDirectAccess,
ExtractType,
typename ExtractType::PlainMatrixType
typename ExtractType::PlainObject
>::ret DirectLinearAccessType;
enum {
IsTransposed = Base::IsTransposed ? 0 : 1

View File

@ -147,7 +147,7 @@ template<typename T, typename StorageType = typename ei_traits<T>::StorageType>
template<typename T> struct ei_eval<T,Dense>
{
typedef typename ei_plain_matrix_type<T>::type type;
// typedef typename T::PlainMatrixType type;
// typedef typename T::PlainObject type;
// typedef T::Matrix<typename ei_traits<T>::Scalar,
// ei_traits<T>::RowsAtCompileTime,
// ei_traits<T>::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<typename T, int n=1, typename PlainMatrixType = typename ei_eval<T>::type> struct ei_nested
template<typename T, int n=1, typename PlainObject = typename ei_eval<T>::type> struct ei_nested
{
enum {
CostEval = (n+1) * int(NumTraits<typename ei_traits<T>::Scalar>::ReadCost),
@ -266,7 +266,7 @@ template<typename T, int n=1, typename PlainMatrixType = typename ei_eval<T>::ty
typedef typename ei_meta_if<
( int(ei_traits<T>::Flags) & EvalBeforeNestingBit ) ||
( int(CostEval) <= int(CostNoEval) ),
PlainMatrixType,
PlainObject,
typename ei_ref_selector<T>::type
>::ret type;
};

View File

@ -37,7 +37,7 @@ const unsigned int UnitLowerTriangular = UnitLower;
template<typename ExpressionType, unsigned int Added, unsigned int Removed>
template<typename OtherDerived>
typename ExpressionType::PlainMatrixType
typename ExpressionType::PlainObject
Flagged<ExpressionType,Added,Removed>::solveTriangular(const MatrixBase<OtherDerived>& other) const
{
return m_matrix.template triangularView<Added>.solve(other.derived());

View File

@ -276,7 +276,7 @@ inline Matrix<typename NumTraits<typename ei_traits<Derived>::Scalar>::Real, ei_
MatrixBase<Derived>::eigenvalues() const
{
ei_assert(Flags&SelfAdjoint);
return SelfAdjointEigenSolver<typename Derived::PlainMatrixType>(eval(),false).eigenvalues();
return SelfAdjointEigenSolver<typename Derived::PlainObject>(eval(),false).eigenvalues();
}
template<typename Derived, bool IsSelfAdjoint>
@ -296,7 +296,7 @@ template<typename Derived> struct ei_operatorNorm_selector<Derived, false>
static inline typename NumTraits<typename ei_traits<Derived>::Scalar>::Real
operatorNorm(const MatrixBase<Derived>& 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(

View File

@ -213,9 +213,9 @@ struct ei_traits<ei_homogeneous_left_product_impl<Homogeneous<MatrixType,Vertica
typedef Matrix<typename ei_traits<MatrixType>::Scalar,
Lhs::RowsAtCompileTime,
MatrixType::ColsAtCompileTime,
MatrixType::PlainMatrixType::Options,
MatrixType::PlainObject::Options,
Lhs::MaxRowsAtCompileTime,
MatrixType::MaxColsAtCompileTime> ReturnMatrixType;
MatrixType::MaxColsAtCompileTime> ReturnType;
};
template<typename MatrixType,typename Lhs>
@ -251,9 +251,9 @@ struct ei_traits<ei_homogeneous_right_product_impl<Homogeneous<MatrixType,Horizo
typedef Matrix<typename ei_traits<MatrixType>::Scalar,
MatrixType::RowsAtCompileTime,
Rhs::ColsAtCompileTime,
MatrixType::PlainMatrixType::Options,
MatrixType::PlainObject::Options,
MatrixType::MaxRowsAtCompileTime,
Rhs::MaxColsAtCompileTime> ReturnMatrixType;
Rhs::MaxColsAtCompileTime> ReturnType;
};
template<typename MatrixType,typename Rhs>

View File

@ -35,7 +35,7 @@
*/
template<typename Derived>
template<typename OtherDerived>
inline typename MatrixBase<Derived>::PlainMatrixType
inline typename MatrixBase<Derived>::PlainObject
MatrixBase<Derived>::cross(const MatrixBase<OtherDerived>& other) const
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,3)
@ -79,7 +79,7 @@ struct ei_cross3_impl {
*/
template<typename Derived>
template<typename OtherDerived>
inline typename MatrixBase<Derived>::PlainMatrixType
inline typename MatrixBase<Derived>::PlainObject
MatrixBase<Derived>::cross3(const MatrixBase<OtherDerived>& other) const
{
EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Derived,4)
@ -210,7 +210,7 @@ struct ei_unitOrthogonal_selector<Derived,2>
* \sa cross()
*/
template<typename Derived>
typename MatrixBase<Derived>::PlainMatrixType
typename MatrixBase<Derived>::PlainObject
MatrixBase<Derived>::unitOrthogonal() const
{
EIGEN_STATIC_ASSERT_VECTOR_ONLY(Derived)

View File

@ -99,7 +99,7 @@ void MatrixBase<Derived>::applyHouseholderOnTheLeft(
const Scalar& tau,
Scalar* workspace)
{
Map<Matrix<Scalar, 1, Base::ColsAtCompileTime, PlainMatrixType::Options, 1, Base::MaxColsAtCompileTime> > tmp(workspace,cols());
Map<Matrix<Scalar, 1, Base::ColsAtCompileTime, PlainObject::Options, 1, Base::MaxColsAtCompileTime> > tmp(workspace,cols());
Block<Derived, EssentialPart::SizeAtCompileTime, Derived::ColsAtCompileTime> bottom(derived(), 1, 0, rows()-1, cols());
tmp.noalias() = essential.adjoint() * bottom;
tmp += this->row(0);
@ -114,7 +114,7 @@ void MatrixBase<Derived>::applyHouseholderOnTheRight(
const Scalar& tau,
Scalar* workspace)
{
Map<Matrix<Scalar, Base::RowsAtCompileTime, 1, PlainMatrixType::Options, Base::MaxRowsAtCompileTime, 1> > tmp(workspace,rows());
Map<Matrix<Scalar, Base::RowsAtCompileTime, 1, PlainObject::Options, Base::MaxRowsAtCompileTime, 1> > tmp(workspace,rows());
Block<Derived, Derived::RowsAtCompileTime, EssentialPart::SizeAtCompileTime> right(derived(), 0, 1, rows(), cols()-1);
tmp.noalias() = right * essential.conjugate();
tmp += this->col(0);

View File

@ -630,7 +630,7 @@ struct ei_solve_retval<FullPivLU<_MatrixType>, 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<FullPivLU<_MatrixType>, Rhs>
* \sa class FullPivLU
*/
template<typename Derived>
inline const FullPivLU<typename MatrixBase<Derived>::PlainMatrixType>
inline const FullPivLU<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::fullPivLu() const
{
return FullPivLU<PlainMatrixType>(eval());
return FullPivLU<PlainObject>(eval());
}
#endif // EIGEN_LU_H

View File

@ -238,7 +238,7 @@ struct ei_compute_inverse_and_det_with_check<MatrixType, ResultType, 4>
template<typename MatrixType>
struct ei_traits<ei_inverse_impl<MatrixType> >
{
typedef typename MatrixType::PlainMatrixType ReturnMatrixType;
typedef typename MatrixType::PlainObject ReturnType;
};
template<typename MatrixType>
@ -327,7 +327,7 @@ inline void MatrixBase<Derived>::computeInverseAndDetWithCheck(
typedef typename ei_meta_if<
RowsAtCompileTime == 2,
typename ei_cleantype<typename ei_nested<Derived, 2>::type>::type,
PlainMatrixType
PlainObject
>::ret MatrixType;
ei_compute_inverse_and_det_with_check<MatrixType, ResultType>::run
(derived(), absDeterminantThreshold, inverse, determinant, invertible);

View File

@ -442,10 +442,10 @@ struct ei_solve_retval<PartialPivLU<_MatrixType>, Rhs>
* \sa class PartialPivLU
*/
template<typename Derived>
inline const PartialPivLU<typename MatrixBase<Derived>::PlainMatrixType>
inline const PartialPivLU<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::partialPivLu() const
{
return PartialPivLU<PlainMatrixType>(eval());
return PartialPivLU<PlainObject>(eval());
}
/** \lu_module
@ -457,10 +457,10 @@ MatrixBase<Derived>::partialPivLu() const
* \sa class PartialPivLU
*/
template<typename Derived>
inline const PartialPivLU<typename MatrixBase<Derived>::PlainMatrixType>
inline const PartialPivLU<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::lu() const
{
return PartialPivLU<PlainMatrixType>(eval());
return PartialPivLU<PlainObject>(eval());
}
#endif // EIGEN_PARTIALLU_H

View File

@ -441,7 +441,7 @@ struct ei_solve_retval<ColPivHouseholderQR<_MatrixType>, 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<ColPivHouseholderQR<_MatrixType>, 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<MatrixType>::HouseholderSequenceType ColPivHousehol
* \sa class ColPivHouseholderQR
*/
template<typename Derived>
const ColPivHouseholderQR<typename MatrixBase<Derived>::PlainMatrixType>
const ColPivHouseholderQR<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::colPivHouseholderQr() const
{
return ColPivHouseholderQR<PlainMatrixType>(eval());
return ColPivHouseholderQR<PlainObject>(eval());
}

View File

@ -352,7 +352,7 @@ struct ei_solve_retval<FullPivHouseholderQR<_MatrixType>, Rhs>
return;
}
typename Rhs::PlainMatrixType c(rhs());
typename Rhs::PlainObject c(rhs());
Matrix<Scalar,1,Rhs::ColsAtCompileTime> temp(rhs().cols());
for (int k = 0; k < dec().rank(); ++k)
@ -413,10 +413,10 @@ typename FullPivHouseholderQR<MatrixType>::MatrixQType FullPivHouseholderQR<Matr
* \sa class FullPivHouseholderQR
*/
template<typename Derived>
const FullPivHouseholderQR<typename MatrixBase<Derived>::PlainMatrixType>
const FullPivHouseholderQR<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::fullPivHouseholderQr() const
{
return FullPivHouseholderQR<PlainMatrixType>(eval());
return FullPivHouseholderQR<PlainObject>(eval());
}
#endif // EIGEN_FULLPIVOTINGHOUSEHOLDERQR_H

View File

@ -221,7 +221,7 @@ struct ei_solve_retval<HouseholderQR<_MatrixType>, 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<HouseholderQR<_MatrixType>, Rhs>
* \sa class HouseholderQR
*/
template<typename Derived>
const HouseholderQR<typename MatrixBase<Derived>::PlainMatrixType>
const HouseholderQR<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::householderQr() const
{
return HouseholderQR<PlainMatrixType>(eval());
return HouseholderQR<PlainObject>(eval());
}

View File

@ -555,10 +555,10 @@ void SVD<MatrixType>::computeScalingRotation(ScalingType *scaling, RotationType
* \returns the SVD decomposition of \c *this
*/
template<typename Derived>
inline SVD<typename MatrixBase<Derived>::PlainMatrixType>
inline SVD<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::svd() const
{
return SVD<PlainMatrixType>(derived());
return SVD<PlainObject>(derived());
}
#endif // EIGEN_SVD_H

View File

@ -141,10 +141,10 @@ UpperBidiagonalization<_MatrixType>& UpperBidiagonalization<_MatrixType>::comput
* \sa class Bidiagonalization
*/
template<typename Derived>
const UpperBidiagonalization<typename MatrixBase<Derived>::PlainMatrixType>
const UpperBidiagonalization<typename MatrixBase<Derived>::PlainObject>
MatrixBase<Derived>::bidiagonalization() const
{
return UpperBidiagonalization<PlainMatrixType>(eval());
return UpperBidiagonalization<PlainObject>(eval());
}
#endif

View File

@ -109,7 +109,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
Transpose<Derived>
>::ret AdjointReturnType;
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor> PlainMatrixType;
typedef SparseMatrix<Scalar, Flags&RowMajorBit ? RowMajor : ColMajor> PlainObject;
#define EIGEN_CURRENT_STORAGE_BASE_CLASS Eigen::SparseMatrixBase
#include "../plugins/CommonCwiseUnaryOps.h"
@ -396,7 +396,7 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived>
template<typename OtherDerived> Scalar dot(const SparseMatrixBase<OtherDerived>& other) const;
RealScalar squaredNorm() const;
RealScalar norm() const;
// const PlainMatrixType normalized() const;
// const PlainObject normalized() const;
// void normalize();
Transpose<Derived> transpose() { return derived(); }

View File

@ -93,8 +93,8 @@ template<typename MatrixType, unsigned int UpLo> class SparseSelfAdjointView
template<typename DerivedU>
SparseSelfAdjointView& rankUpdate(const MatrixBase<DerivedU>& u, Scalar alpha = Scalar(1));
// const SparseLLT<PlainMatrixType, UpLo> llt() const;
// const SparseLDLT<PlainMatrixType, UpLo> ldlt() const;
// const SparseLLT<PlainObject, UpLo> llt() const;
// const SparseLDLT<PlainObject, UpLo> ldlt() const;
protected:

View File

@ -40,7 +40,7 @@ struct ei_traits<ei_image_retval_base<DecompositionType> >
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<typename _DecompositionType> struct ei_image_retval_base

View File

@ -42,7 +42,7 @@ struct ei_traits<ei_kernel_retval_base<DecompositionType> >
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<typename _DecompositionType> struct ei_kernel_retval_base

View File

@ -35,9 +35,9 @@ struct ei_traits<ei_solve_retval_base<DecompositionType, Rhs> >
typedef Matrix<typename Rhs::Scalar,
MatrixType::ColsAtCompileTime,
Rhs::ColsAtCompileTime,
Rhs::PlainMatrixType::Options,
Rhs::PlainObject::Options,
MatrixType::MaxColsAtCompileTime,
Rhs::MaxColsAtCompileTime> ReturnMatrixType;
Rhs::MaxColsAtCompileTime> ReturnType;
};
template<typename _DecompositionType, typename Rhs> struct ei_solve_retval_base

View File

@ -62,7 +62,7 @@ class BandMatrix : public MultiplierBase<BandMatrix<_Scalar,Supers,Subs,Options>
MaxColsAtCompileTime = ei_traits<BandMatrix>::MaxColsAtCompileTime
};
typedef typename ei_traits<BandMatrix>::Scalar Scalar;
typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> PlainMatrixType;
typedef Matrix<Scalar,RowsAtCompileTime,ColsAtCompileTime> PlainObject;
protected:
enum {
@ -125,9 +125,9 @@ class BandMatrix : public MultiplierBase<BandMatrix<_Scalar,Supers,Subs,Options>
// inline VectorBlock<DataType,Size> subDiagonal()
// { return VectorBlock<DataType,Size>(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)

View File

@ -51,8 +51,8 @@ template<typename MatrixType> void lu_non_invertible()
cols2 = cols = MatrixType::ColsAtCompileTime;
}
typedef typename ei_kernel_retval_base<FullPivLU<MatrixType> >::ReturnMatrixType KernelMatrixType;
typedef typename ei_image_retval_base<FullPivLU<MatrixType> >::ReturnMatrixType ImageMatrixType;
typedef typename ei_kernel_retval_base<FullPivLU<MatrixType> >::ReturnType KernelMatrixType;
typedef typename ei_image_retval_base<FullPivLU<MatrixType> >::ReturnType ImageMatrixType;
typedef Matrix<typename MatrixType::Scalar, Dynamic, Dynamic> DynamicMatrixType;
typedef Matrix<typename MatrixType::Scalar, MatrixType::ColsAtCompileTime, MatrixType::ColsAtCompileTime>
CMatrixType;

View File

@ -313,7 +313,7 @@ template<typename Derived> struct MatrixExponentialReturnValue
inline void evalTo(ResultType& result) const
{
const typename ei_eval<Derived>::type srcEvaluated = m_src.eval();
MatrixExponential<typename Derived::PlainMatrixType> me(srcEvaluated);
MatrixExponential<typename Derived::PlainObject> me(srcEvaluated);
me.compute(result);
}
@ -327,7 +327,7 @@ template<typename Derived> struct MatrixExponentialReturnValue
template<typename Derived>
struct ei_traits<MatrixExponentialReturnValue<Derived> >
{
typedef typename Derived::PlainMatrixType ReturnMatrixType;
typedef typename Derived::PlainObject ReturnType;
};
/** \ingroup MatrixFunctions_Module

View File

@ -516,7 +516,7 @@ template<typename Derived> class MatrixFunctionReturnValue
inline void evalTo(ResultType& result) const
{
const typename ei_eval<Derived>::type Aevaluated = m_A.eval();
MatrixFunction<typename Derived::PlainMatrixType> mf(Aevaluated, m_f);
MatrixFunction<typename Derived::PlainObject> mf(Aevaluated, m_f);
mf.compute(result);
}
@ -531,7 +531,7 @@ template<typename Derived> class MatrixFunctionReturnValue
template<typename Derived>
struct ei_traits<MatrixFunctionReturnValue<Derived> >
{
typedef typename Derived::PlainMatrixType ReturnMatrixType;
typedef typename Derived::PlainObject ReturnType;
};