* add real scalar * complex matrix, real matrix * complex scalar,

and complex scalar * real matrix overloads
* allows the inner and outer product specialisations to mix real and complex
This commit is contained in:
Gael Guennebaud
2009-09-04 11:22:32 +02:00
parent 6902ef0824
commit b0aa2520f1
6 changed files with 70 additions and 29 deletions

View File

@@ -233,6 +233,10 @@ struct ei_special_scalar_op_base<Derived,Scalar,OtherScalar,true>
return CwiseUnaryOp<ei_scalar_multiple2_op<Scalar,OtherScalar>, Derived>
(*static_cast<const Derived*>(this), ei_scalar_multiple2_op<Scalar,OtherScalar>(scalar));
}
inline friend const CwiseUnaryOp<ei_scalar_multiple2_op<Scalar,OtherScalar>, Derived>
operator*(const OtherScalar& scalar, const Derived& matrix)
{ return matrix*scalar; }
};
/** \internal Gives the type of a sub-matrix or sub-vector of a matrix of type \a ExpressionType and size \a Size