diff options
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/BandMatrix.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/DiagonalMatrix.h | 17 | ||||
-rw-r--r-- | Eigen/src/Core/Matrix.h | 1 | ||||
-rw-r--r-- | Eigen/src/Core/MatrixBase.h | 52 | ||||
-rw-r--r-- | Eigen/src/Core/Product.h | 2 | ||||
-rw-r--r-- | Eigen/src/Core/ReturnByValue.h | 32 | ||||
-rw-r--r-- | Eigen/src/Core/SelfAdjointView.h | 48 | ||||
-rw-r--r-- | Eigen/src/Core/TriangularMatrix.h | 12 | ||||
-rw-r--r-- | Eigen/src/Core/products/TriangularMatrixMatrix.h | 19 | ||||
-rw-r--r-- | Eigen/src/Core/products/TriangularMatrixVector.h | 19 | ||||
-rw-r--r-- | Eigen/src/Core/util/ForwardDeclarations.h | 1 |
11 files changed, 108 insertions, 97 deletions
diff --git a/Eigen/src/Core/BandMatrix.h b/Eigen/src/Core/BandMatrix.h index 2da463afc..c22696992 100644 --- a/Eigen/src/Core/BandMatrix.h +++ b/Eigen/src/Core/BandMatrix.h @@ -57,7 +57,7 @@ struct ei_traits<BandMatrix<_Scalar,Rows,Cols,Supers,Subs,Options> > }; template<typename _Scalar, int Rows, int Cols, int Supers, int Subs, int Options> -class BandMatrix : public MultiplierBase<BandMatrix<_Scalar,Rows,Cols,Supers,Subs,Options> > +class BandMatrix : public AnyMatrixBase<BandMatrix<_Scalar,Rows,Cols,Supers,Subs,Options> > { public: diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index 5fc80c92b..ebbed15d4 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -27,7 +27,7 @@ #define EIGEN_DIAGONALMATRIX_H template<typename Derived> -class DiagonalBase : public MultiplierBase<Derived> +class DiagonalBase : public AnyMatrixBase<Derived> { public: typedef typename ei_traits<Derived>::DiagonalVectorType DiagonalVectorType; @@ -52,6 +52,12 @@ class DiagonalBase : public MultiplierBase<Derived> DenseMatrixType toDenseMatrix() const { return derived(); } template<typename DenseDerived> void evalToDense(MatrixBase<DenseDerived> &other) const; + template<typename DenseDerived> + void addToDense(MatrixBase<DenseDerived> &other) const + { other.diagonal() += diagonal(); } + template<typename DenseDerived> + void subToDense(MatrixBase<DenseDerived> &other) const + { other.diagonal() -= diagonal(); } inline const DiagonalVectorType& diagonal() const { return derived().diagonal(); } inline DiagonalVectorType& diagonal() { return derived().diagonal(); } @@ -84,6 +90,7 @@ void DiagonalBase<Derived>::evalToDense(MatrixBase<DenseDerived> &other) const */ template<typename _Scalar, int _Size> struct ei_traits<DiagonalMatrix<_Scalar,_Size> > + : ei_traits<Matrix<_Scalar,_Size,_Size> > { typedef Matrix<_Scalar,_Size,1> DiagonalVectorType; }; @@ -170,6 +177,14 @@ template<typename _DiagonalVectorType> struct ei_traits<DiagonalWrapper<_DiagonalVectorType> > { typedef _DiagonalVectorType DiagonalVectorType; + typedef typename DiagonalVectorType::Scalar Scalar; + enum { + RowsAtCompileTime = DiagonalVectorType::SizeAtCompileTime, + ColsAtCompileTime = DiagonalVectorType::SizeAtCompileTime, + MaxRowsAtCompileTime = DiagonalVectorType::SizeAtCompileTime, + MaxColsAtCompileTime = DiagonalVectorType::SizeAtCompileTime, + Flags = 0 + }; }; template<typename _DiagonalVectorType> diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 8937596f2..c31acabca 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -462,6 +462,7 @@ class Matrix : m_storage(other.derived().rows() * other.derived().cols(), other.derived().rows(), other.derived().cols()) { _check_template_params(); + resize(other.rows(), other.cols()); *this = other; } diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index b881c09c3..30cfbb192 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -37,19 +37,31 @@ */ template<typename Derived> struct AnyMatrixBase { + typedef typename ei_plain_matrix_type<Derived>::type PlainMatrixType; + Derived& derived() { return *static_cast<Derived*>(this); } const Derived& derived() const { return *static_cast<const Derived*>(this); } -}; -/** Common base class for all classes T such that there are overloaded operator* allowing to - * multiply a MatrixBase by a T on both sides. - * - * In other words, an AnyMatrixBase object is an object that can be multiplied a MatrixBase, the result being again a MatrixBase. - * - * Besides MatrixBase-derived classes, this also includes certain special matrix classes, such as diagonal matrices. - */ -template<typename Derived> struct MultiplierBase : public AnyMatrixBase<Derived> -{ - using AnyMatrixBase<Derived>::derived; + /** \returns the number of rows. \sa cols(), RowsAtCompileTime */ + inline int rows() const { return derived().rows(); } + /** \returns the number of columns. \sa rows(), ColsAtCompileTime*/ + inline int cols() const { return derived().cols(); } + + template<typename Dest> inline void evalTo(Dest& dst) const + { derived().evalTo(dst); } + + template<typename Dest> inline void addToDense(Dest& dst) const + { + typename Dest::PlainMatrixType res(rows(),cols()); + evalToDense(res); + dst += res; + } + + template<typename Dest> inline void subToDense(Dest& dst) const + { + typename Dest::PlainMatrixType res(rows(),cols()); + evalToDense(res); + dst -= res; + } }; /** \class MatrixBase @@ -79,7 +91,7 @@ template<typename Derived> struct MultiplierBase : public AnyMatrixBase<Derived> */ template<typename Derived> class MatrixBase #ifndef EIGEN_PARSED_BY_DOXYGEN - : public MultiplierBase<Derived>, + : public AnyMatrixBase<Derived>, public ei_special_scalar_op_base<Derived,typename ei_traits<Derived>::Scalar, typename NumTraits<typename ei_traits<Derived>::Scalar>::Real> #endif // not EIGEN_PARSED_BY_DOXYGEN @@ -298,12 +310,16 @@ template<typename Derived> class MatrixBase Derived& operator=(const AnyMatrixBase<OtherDerived> &other) { other.derived().evalToDense(derived()); return derived(); } + template<typename OtherDerived> + Derived& operator+=(const AnyMatrixBase<OtherDerived> &other) + { other.derived().addToDense(derived()); return derived(); } + + template<typename OtherDerived> + Derived& operator-=(const AnyMatrixBase<OtherDerived> &other) + { other.derived().subToDense(derived()); return derived(); } + template<typename OtherDerived,typename OtherEvalType> Derived& operator=(const ReturnByValue<OtherDerived,OtherEvalType>& func); - template<typename OtherDerived,typename OtherEvalType> - Derived& operator+=(const ReturnByValue<OtherDerived,OtherEvalType>& func); - template<typename OtherDerived,typename OtherEvalType> - Derived& operator-=(const ReturnByValue<OtherDerived,OtherEvalType>& func); #ifndef EIGEN_PARSED_BY_DOXYGEN /** Copies \a other into *this without evaluating other. \returns a reference to *this. */ @@ -410,7 +426,7 @@ template<typename Derived> class MatrixBase operator*(const MatrixBase<OtherDerived> &other) const; template<typename OtherDerived> - Derived& operator*=(const MultiplierBase<OtherDerived>& other); + Derived& operator*=(const AnyMatrixBase<OtherDerived>& other); template<typename DiagonalDerived> const DiagonalProduct<Derived, DiagonalDerived, DiagonalOnTheRight> @@ -645,7 +661,7 @@ template<typename Derived> class MatrixBase void visit(Visitor& func) const; #ifndef EIGEN_PARSED_BY_DOXYGEN - using MultiplierBase<Derived>::derived; + using AnyMatrixBase<Derived>::derived; inline Derived& const_cast_derived() const { return *static_cast<Derived*>(const_cast<MatrixBase*>(this)); } #endif // not EIGEN_PARSED_BY_DOXYGEN diff --git a/Eigen/src/Core/Product.h b/Eigen/src/Core/Product.h index ff45cba3c..1a32eb5de 100644 --- a/Eigen/src/Core/Product.h +++ b/Eigen/src/Core/Product.h @@ -294,7 +294,7 @@ MatrixBase<Derived>::operator*(const MatrixBase<OtherDerived> &other) const template<typename Derived> template<typename OtherDerived> inline Derived & -MatrixBase<Derived>::operator*=(const MultiplierBase<OtherDerived> &other) +MatrixBase<Derived>::operator*=(const AnyMatrixBase<OtherDerived> &other) { return derived() = derived() * other.derived(); } diff --git a/Eigen/src/Core/ReturnByValue.h b/Eigen/src/Core/ReturnByValue.h index 58b205edc..3f2b478ff 100644 --- a/Eigen/src/Core/ReturnByValue.h +++ b/Eigen/src/Core/ReturnByValue.h @@ -48,14 +48,6 @@ template<typename Functor, typename EvalType> class ReturnByValue public: template<typename Dest> inline void evalTo(Dest& dst) const { static_cast<const Functor*>(this)->evalTo(dst); } - template<typename Dest> inline void addTo(Dest& dst) const - { static_cast<const Functor*>(this)->_addTo(dst); } - template<typename Dest> inline void subTo(Dest& dst) const - { static_cast<const Functor*>(this)->_subTo(dst); } - template<typename Dest> inline void _addTo(Dest& dst) const - { EvalType res; evalTo(res); dst += res; } - template<typename Dest> inline void _subTo(Dest& dst) const - { EvalType res; evalTo(res); dst -= res; } }; template<typename Functor, typename _Scalar,int _Rows,int _Cols,int _Options,int _MaxRows,int _MaxCols> @@ -68,14 +60,6 @@ template<typename Functor, typename _Scalar,int _Rows,int _Cols,int _Options,int template<typename Dest> inline void evalTo(Dest& dst) const { static_cast<const Functor* const>(this)->evalTo(dst); } - template<typename Dest> inline void addTo(Dest& dst) const - { static_cast<const Functor*>(this)->_addTo(dst); } - template<typename Dest> inline void subTo(Dest& dst) const - { static_cast<const Functor*>(this)->_subTo(dst); } - template<typename Dest> inline void _addTo(Dest& dst) const - { EvalType res; evalTo(res); dst += res; } - template<typename Dest> inline void _subTo(Dest& dst) const - { EvalType res; evalTo(res); dst -= res; } inline int rows() const { return static_cast<const Functor* const>(this)->rows(); } inline int cols() const { return static_cast<const Functor* const>(this)->cols(); } }; @@ -88,20 +72,4 @@ Derived& MatrixBase<Derived>::operator=(const ReturnByValue<OtherDerived,OtherEv return derived(); } -template<typename Derived> -template<typename OtherDerived,typename OtherEvalType> -Derived& MatrixBase<Derived>::operator+=(const ReturnByValue<OtherDerived,OtherEvalType>& other) -{ - other.addTo(derived()); - return derived(); -} - -template<typename Derived> -template<typename OtherDerived,typename OtherEvalType> -Derived& MatrixBase<Derived>::operator-=(const ReturnByValue<OtherDerived,OtherEvalType>& other) -{ - other.subTo(derived()); - return derived(); -} - #endif // EIGEN_RETURNBYVALUE_H diff --git a/Eigen/src/Core/SelfAdjointView.h b/Eigen/src/Core/SelfAdjointView.h index c21f3a377..0a4ba17c0 100644 --- a/Eigen/src/Core/SelfAdjointView.h +++ b/Eigen/src/Core/SelfAdjointView.h @@ -55,7 +55,7 @@ struct ei_traits<SelfAdjointView<MatrixType, TriangularPart> > : ei_traits<Matri template <typename Lhs, int LhsMode, bool LhsIsVector, typename Rhs, int RhsMode, bool RhsIsVector> -struct ei_selfadjoint_product_returntype; +struct SelfadjointProductMatrix; // FIXME could also be called SelfAdjointWrapper to be consistent with DiagonalWrapper ?? template<typename MatrixType, unsigned int UpLo> class SelfAdjointView @@ -100,20 +100,20 @@ template<typename MatrixType, unsigned int UpLo> class SelfAdjointView /** Efficient self-adjoint matrix times vector/matrix product */ template<typename OtherDerived> - ei_selfadjoint_product_returntype<MatrixType,Mode,false,OtherDerived,0,OtherDerived::IsVectorAtCompileTime> + SelfadjointProductMatrix<MatrixType,Mode,false,OtherDerived,0,OtherDerived::IsVectorAtCompileTime> operator*(const MatrixBase<OtherDerived>& rhs) const { - return ei_selfadjoint_product_returntype + return SelfadjointProductMatrix <MatrixType,Mode,false,OtherDerived,0,OtherDerived::IsVectorAtCompileTime> (m_matrix, rhs.derived()); } /** Efficient vector/matrix times self-adjoint matrix product */ template<typename OtherDerived> friend - ei_selfadjoint_product_returntype<OtherDerived,0,OtherDerived::IsVectorAtCompileTime,MatrixType,Mode,false> + SelfadjointProductMatrix<OtherDerived,0,OtherDerived::IsVectorAtCompileTime,MatrixType,Mode,false> operator*(const MatrixBase<OtherDerived>& lhs, const SelfAdjointView& rhs) { - return ei_selfadjoint_product_returntype + return SelfadjointProductMatrix <OtherDerived,0,OtherDerived::IsVectorAtCompileTime,MatrixType,Mode,false> (lhs.derived(),rhs.m_matrix); } @@ -201,10 +201,13 @@ struct ei_triangular_assignment_selector<Derived1, Derived2, SelfAdjoint, Dynami ***************************************************************************/ template<typename Lhs, int LhsMode, typename Rhs> -struct ei_selfadjoint_product_returntype<Lhs,LhsMode,false,Rhs,0,true> - : public ReturnByValue<ei_selfadjoint_product_returntype<Lhs,LhsMode,false,Rhs,0,true>, - Matrix<typename ei_traits<Rhs>::Scalar, - Rhs::RowsAtCompileTime,Rhs::ColsAtCompileTime> > +struct ei_traits<SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true> > + : ei_traits<Matrix<typename ei_traits<Rhs>::Scalar,Lhs::RowsAtCompileTime,Rhs::ColsAtCompileTime> > +{}; + +template<typename Lhs, int LhsMode, typename Rhs> +struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true> + : public AnyMatrixBase<SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,0,true> > { typedef typename Lhs::Scalar Scalar; @@ -224,19 +227,19 @@ struct ei_selfadjoint_product_returntype<Lhs,LhsMode,false,Rhs,0,true> LhsUpLo = LhsMode&(UpperTriangularBit|LowerTriangularBit) }; - ei_selfadjoint_product_returntype(const Lhs& lhs, const Rhs& rhs) + SelfadjointProductMatrix(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) {} inline int rows() const { return m_lhs.rows(); } inline int cols() const { return m_rhs.cols(); } - template<typename Dest> inline void _addTo(Dest& dst) const + template<typename Dest> inline void addToDense(Dest& dst) const { evalTo(dst,1); } - template<typename Dest> inline void _subTo(Dest& dst) const + template<typename Dest> inline void subToDense(Dest& dst) const { evalTo(dst,-1); } - template<typename Dest> void evalTo(Dest& dst) const + template<typename Dest> void evalToDense(Dest& dst) const { dst.setZero(); evalTo(dst,1); @@ -272,12 +275,15 @@ struct ei_selfadjoint_product_returntype<Lhs,LhsMode,false,Rhs,0,true> ***************************************************************************/ template<typename Lhs, int LhsMode, typename Rhs, int RhsMode> -struct ei_selfadjoint_product_returntype<Lhs,LhsMode,false,Rhs,RhsMode,false> - : public ReturnByValue<ei_selfadjoint_product_returntype<Lhs,LhsMode,false,Rhs,RhsMode,false>, - Matrix<typename ei_traits<Rhs>::Scalar, - Lhs::RowsAtCompileTime,Rhs::ColsAtCompileTime> > +struct ei_traits<SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,RhsMode,false> > + : ei_traits<Matrix<typename ei_traits<Rhs>::Scalar,Lhs::RowsAtCompileTime,Rhs::ColsAtCompileTime> > +{}; + +template<typename Lhs, int LhsMode, typename Rhs, int RhsMode> +struct SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,RhsMode,false> + : public AnyMatrixBase<SelfadjointProductMatrix<Lhs,LhsMode,false,Rhs,RhsMode,false> > { - ei_selfadjoint_product_returntype(const Lhs& lhs, const Rhs& rhs) + SelfadjointProductMatrix(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) {} @@ -305,12 +311,12 @@ struct ei_selfadjoint_product_returntype<Lhs,LhsMode,false,Rhs,RhsMode,false> RhsIsSelfAdjoint = (RhsMode&SelfAdjointBit)==SelfAdjointBit }; - template<typename Dest> inline void _addTo(Dest& dst) const + template<typename Dest> inline void addToDense(Dest& dst) const { evalTo(dst,1); } - template<typename Dest> inline void _subTo(Dest& dst) const + template<typename Dest> inline void subToDense(Dest& dst) const { evalTo(dst,-1); } - template<typename Dest> void evalTo(Dest& dst) const + template<typename Dest> void evalToDense(Dest& dst) const { dst.setZero(); evalTo(dst,1); diff --git a/Eigen/src/Core/TriangularMatrix.h b/Eigen/src/Core/TriangularMatrix.h index 8b6c9a23b..c262ea7a7 100644 --- a/Eigen/src/Core/TriangularMatrix.h +++ b/Eigen/src/Core/TriangularMatrix.h @@ -43,7 +43,7 @@ * * \sa MatrixBase::part() */ -template<typename Derived> class TriangularBase : public MultiplierBase<Derived> +template<typename Derived> class TriangularBase : public AnyMatrixBase<Derived> { public: @@ -145,7 +145,7 @@ struct ei_traits<TriangularView<MatrixType, _Mode> > : ei_traits<MatrixType> template<int Mode, bool LhsIsTriangular, typename Lhs, bool LhsIsVector, typename Rhs, bool RhsIsVector> -struct ei_triangular_product_returntype; +struct TriangularProduct; template<typename _MatrixType, unsigned int _Mode> class TriangularView : public TriangularBase<TriangularView<_MatrixType, _Mode> > @@ -253,20 +253,20 @@ template<typename _MatrixType, unsigned int _Mode> class TriangularView /** Efficient triangular matrix times vector/matrix product */ template<typename OtherDerived> - ei_triangular_product_returntype<Mode,true,MatrixType,false,OtherDerived,OtherDerived::IsVectorAtCompileTime> + TriangularProduct<Mode,true,MatrixType,false,OtherDerived,OtherDerived::IsVectorAtCompileTime> operator*(const MatrixBase<OtherDerived>& rhs) const { - return ei_triangular_product_returntype + return TriangularProduct <Mode,true,MatrixType,false,OtherDerived,OtherDerived::IsVectorAtCompileTime> (m_matrix, rhs.derived()); } /** Efficient vector/matrix times triangular matrix product */ template<typename OtherDerived> friend - ei_triangular_product_returntype<Mode,false,OtherDerived,OtherDerived::IsVectorAtCompileTime,MatrixType,false> + TriangularProduct<Mode,false,OtherDerived,OtherDerived::IsVectorAtCompileTime,MatrixType,false> operator*(const MatrixBase<OtherDerived>& lhs, const TriangularView& rhs) { - return ei_triangular_product_returntype + return TriangularProduct <Mode,false,OtherDerived,OtherDerived::IsVectorAtCompileTime,MatrixType,false> (lhs.derived(),rhs.m_matrix); } diff --git a/Eigen/src/Core/products/TriangularMatrixMatrix.h b/Eigen/src/Core/products/TriangularMatrixMatrix.h index ce18941ee..f69c04365 100644 --- a/Eigen/src/Core/products/TriangularMatrixMatrix.h +++ b/Eigen/src/Core/products/TriangularMatrixMatrix.h @@ -321,12 +321,15 @@ struct ei_product_triangular_matrix_matrix<Scalar,Mode,false, ***************************************************************************/ template<int Mode, bool LhsIsTriangular, typename Lhs, typename Rhs> -struct ei_triangular_product_returntype<Mode,LhsIsTriangular,Lhs,false,Rhs,false> - : public ReturnByValue<ei_triangular_product_returntype<Mode,LhsIsTriangular,Lhs,false,Rhs,false>, - Matrix<typename ei_traits<Rhs>::Scalar, - Lhs::RowsAtCompileTime,Rhs::ColsAtCompileTime> > +struct ei_traits<TriangularProduct<Mode,LhsIsTriangular,Lhs,false,Rhs,false> > + : ei_traits<Matrix<typename ei_traits<Rhs>::Scalar,Lhs::RowsAtCompileTime,Rhs::ColsAtCompileTime> > +{}; + +template<int Mode, bool LhsIsTriangular, typename Lhs, typename Rhs> +struct TriangularProduct<Mode,LhsIsTriangular,Lhs,false,Rhs,false> + : public AnyMatrixBase<TriangularProduct<Mode,LhsIsTriangular,Lhs,false,Rhs,false> > { - ei_triangular_product_returntype(const Lhs& lhs, const Rhs& rhs) + TriangularProduct(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) {} @@ -347,12 +350,12 @@ struct ei_triangular_product_returntype<Mode,LhsIsTriangular,Lhs,false,Rhs,false typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType; typedef typename ei_cleantype<ActualRhsType>::type _ActualRhsType; - template<typename Dest> inline void _addTo(Dest& dst) const + template<typename Dest> inline void addToDense(Dest& dst) const { evalTo(dst,1); } - template<typename Dest> inline void _subTo(Dest& dst) const + template<typename Dest> inline void subToDense(Dest& dst) const { evalTo(dst,-1); } - template<typename Dest> void evalTo(Dest& dst) const + template<typename Dest> void evalToDense(Dest& dst) const { dst.resize(m_lhs.rows(), m_rhs.cols()); dst.setZero(); diff --git a/Eigen/src/Core/products/TriangularMatrixVector.h b/Eigen/src/Core/products/TriangularMatrixVector.h index 18d76b95c..42239fac0 100644 --- a/Eigen/src/Core/products/TriangularMatrixVector.h +++ b/Eigen/src/Core/products/TriangularMatrixVector.h @@ -118,10 +118,13 @@ struct ei_product_triangular_vector_selector<Lhs,Rhs,Result,Mode,ConjLhs,ConjRhs ***************************************************************************/ template<int Mode, /*bool LhsIsTriangular, */typename Lhs, typename Rhs> -struct ei_triangular_product_returntype<Mode,true,Lhs,false,Rhs,true> - : public ReturnByValue<ei_triangular_product_returntype<Mode,true,Lhs,false,Rhs,true>, - Matrix<typename ei_traits<Rhs>::Scalar, - Rhs::RowsAtCompileTime,Rhs::ColsAtCompileTime> > +struct ei_traits<TriangularProduct<Mode,true,Lhs,false,Rhs,true> > + : ei_traits<Matrix<typename ei_traits<Rhs>::Scalar,Lhs::RowsAtCompileTime,Rhs::ColsAtCompileTime> > +{}; + +template<int Mode, /*bool LhsIsTriangular, */typename Lhs, typename Rhs> +struct TriangularProduct<Mode,true,Lhs,false,Rhs,true> + : public AnyMatrixBase<TriangularProduct<Mode,true,Lhs,false,Rhs,true> > { typedef typename Lhs::Scalar Scalar; @@ -137,19 +140,19 @@ struct ei_triangular_product_returntype<Mode,true,Lhs,false,Rhs,true> typedef typename RhsBlasTraits::DirectLinearAccessType ActualRhsType; typedef typename ei_cleantype<ActualRhsType>::type _ActualRhsType; - ei_triangular_product_returntype(const Lhs& lhs, const Rhs& rhs) + TriangularProduct(const Lhs& lhs, const Rhs& rhs) : m_lhs(lhs), m_rhs(rhs) {} inline int rows() const { return m_lhs.rows(); } inline int cols() const { return m_rhs.cols(); } - template<typename Dest> inline void _addTo(Dest& dst) const + template<typename Dest> inline void addToDense(Dest& dst) const { evalTo(dst,1); } - template<typename Dest> inline void _subTo(Dest& dst) const + template<typename Dest> inline void subToDense(Dest& dst) const { evalTo(dst,-1); } - template<typename Dest> void evalTo(Dest& dst) const + template<typename Dest> void evalToDense(Dest& dst) const { dst.setZero(); evalTo(dst,1); diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index b4fbae28c..310d0fbde 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -29,7 +29,6 @@ template<typename T> struct ei_traits; template<typename T> struct NumTraits; template<typename Derived> struct AnyMatrixBase; -template<typename Derived> struct MultiplierBase; template<typename _Scalar, int _Rows, int _Cols, int _Options = EIGEN_DEFAULT_MATRIX_STORAGE_ORDER_OPTION | AutoAlign, |