add a DenseBase class for MAtrixBase and ArrayBase and more code factorisation

This commit is contained in:
Gael Guennebaud
2009-12-04 23:17:14 +01:00
parent 80ebeae48d
commit 8e05f9cfa1
47 changed files with 1578 additions and 944 deletions

View File

@@ -31,14 +31,7 @@
*
* \sa class CwiseBinaryOp, MatrixBase::operator-=()
*/
template<typename OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<ei_scalar_difference_op<typename ei_traits<Derived>::Scalar>,
Derived, OtherDerived>
operator-(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{
return CwiseBinaryOp<ei_scalar_difference_op<Scalar>,
Derived, OtherDerived>(derived(), other.derived());
}
EIGEN_MAKE_CWISE_BINARY_OP(operator-,ei_scalar_difference_op)
/** \returns an expression of the sum of \c *this and \a other
*
@@ -46,12 +39,7 @@ operator-(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
*
* \sa class CwiseBinaryOp, MatrixBase::operator+=()
*/
template<typename OtherDerived>
EIGEN_STRONG_INLINE const CwiseBinaryOp<ei_scalar_sum_op<typename ei_traits<Derived>::Scalar>, Derived, OtherDerived>
operator+(const EIGEN_CURRENT_STORAGE_BASE_CLASS<OtherDerived> &other) const
{
return CwiseBinaryOp<ei_scalar_sum_op<Scalar>, Derived, OtherDerived>(derived(), other.derived());
}
EIGEN_MAKE_CWISE_BINARY_OP(operator+,ei_scalar_sum_op)
/** \returns an expression of a custom coefficient-wise operator \a func of *this and \a other
*