adapt select, replicate and reverse

This commit is contained in:
Gael Guennebaud
2009-12-10 22:00:35 +01:00
parent 8e05f9cfa1
commit 7caf751fdd
12 changed files with 71 additions and 94 deletions

View File

@@ -32,13 +32,28 @@
*
* \sa class CwiseBinaryOp, cwiseAbs2
*/
#define EIGEN_CWISE_PRODUCT_RETURN_TYPE \
CwiseBinaryOp< \
ei_scalar_product_op< \
typename ei_scalar_product_traits< \
typename ei_traits<Derived>::Scalar, \
typename ei_traits<OtherDerived>::Scalar \
>::ReturnType \
>, \
Derived, \
OtherDerived \
>
template<typename OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<ei_scalar_product_op<Scalar>, Derived, OtherDerived>
EIGEN_STRONG_INLINE const EIGEN_CWISE_PRODUCT_RETURN_TYPE
cwiseProduct(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{
return CwiseBinaryOp<ei_scalar_product_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
return EIGEN_CWISE_PRODUCT_RETURN_TYPE(derived(), other.derived());
}
#undef EIGEN_CWISE_PRODUCT_RETURN_TYPE
/** \returns an expression of the coefficient-wise == operator of *this and \a other
*
* \warning this performs an exact comparison, which is generally a bad idea with floating-point types.