* refactoring of Product:

* use ProductReturnType<>::Type to get the correct Product xpr type
  * Product is no longer instanciated for xpr types which are evaluated
  * vectorization of "a.transpose() * b" for the normal product (small and fixed-size matrix)
  * some cleanning
* removed ArrayBase
This commit is contained in:
Gael Guennebaud
2008-06-19 17:33:57 +00:00
parent 5dbfed1902
commit 82c3cea1d5
12 changed files with 359 additions and 247 deletions

View File

@@ -49,7 +49,7 @@
*
* \nosubgrouping
*/
template<typename Derived> class MatrixBase : public ArrayBase<Derived>
template<typename Derived> class MatrixBase
{
struct CommaInitializer;
@@ -168,16 +168,6 @@ template<typename Derived> class MatrixBase : public ArrayBase<Derived>
};
/** Represents a product scalar-matrix */
typedef CwiseUnaryOp<ei_scalar_multiple_op<Scalar>, Derived> ScalarMultipleReturnType;
/** */
template<typename OtherDerived>
struct ProductReturnType
{
typedef typename ei_meta_if<
(Derived::Flags & OtherDerived::Flags & ArrayBit),
CwiseBinaryOp<ei_scalar_product_op<typename ei_traits<Derived>::Scalar>, Derived, OtherDerived>,
Product<Derived,OtherDerived>
>::ret Type;
};
/** the return type of MatrixBase::conjugate() */
typedef typename ei_meta_if<NumTraits<Scalar>::IsComplex,
CwiseUnaryOp<ei_scalar_conjugate_op<Scalar>, Derived>,
@@ -274,7 +264,7 @@ template<typename Derived> class MatrixBase : public ArrayBase<Derived>
template<typename OtherDerived>
const typename ProductReturnType<OtherDerived>::Type
const typename ProductReturnType<Derived,OtherDerived>::Type
operator*(const MatrixBase<OtherDerived> &other) const;
template<typename OtherDerived>