From af4d8c5cecf1a1595dc601f2220ff3a8fd8d2957 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 17 Dec 2009 19:28:54 +0100 Subject: a couple of fixes, now Array passes the linearstructure test --- Eigen/src/Core/SelfCwiseBinaryOp.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Eigen/src/Core/SelfCwiseBinaryOp.h') diff --git a/Eigen/src/Core/SelfCwiseBinaryOp.h b/Eigen/src/Core/SelfCwiseBinaryOp.h index ac0ccd963..ad5dc819b 100644 --- a/Eigen/src/Core/SelfCwiseBinaryOp.h +++ b/Eigen/src/Core/SelfCwiseBinaryOp.h @@ -35,11 +35,15 @@ template struct ei_traits > : ei_traits {}; template class SelfCwiseBinaryOp - : public MatrixBase > + //: public MatrixBase > + : public MatrixType::template MakeBase< SelfCwiseBinaryOp >::Type { public: - EIGEN_GENERIC_PUBLIC_INTERFACE(SelfCwiseBinaryOp) + typedef typename MatrixType::template MakeBase< SelfCwiseBinaryOp >::Type Base; + _EIGEN_DENSE_PUBLIC_INTERFACE(SelfCwiseBinaryOp) + +// EIGEN_GENERIC_PUBLIC_INTERFACE(SelfCwiseBinaryOp) typedef typename ei_packet_traits::type Packet; using Base::operator=; @@ -65,7 +69,7 @@ template class SelfCwiseBinaryOp } template - void copyCoeff(int row, int col, const MatrixBase& other) + void copyCoeff(int row, int col, const DenseBase& other) { OtherDerived& _other = other.const_cast_derived(); ei_internal_assert(row >= 0 && row < rows() @@ -75,7 +79,7 @@ template class SelfCwiseBinaryOp } template - void copyCoeff(int index, const MatrixBase& other) + void copyCoeff(int index, const DenseBase& other) { OtherDerived& _other = other.const_cast_derived(); ei_internal_assert(index >= 0 && index < m_matrix.size()); @@ -84,7 +88,7 @@ template class SelfCwiseBinaryOp } template - void copyPacket(int row, int col, const MatrixBase& other) + void copyPacket(int row, int col, const DenseBase& other) { OtherDerived& _other = other.const_cast_derived(); ei_internal_assert(row >= 0 && row < rows() @@ -94,7 +98,7 @@ template class SelfCwiseBinaryOp } template - void copyPacket(int index, const MatrixBase& other) + void copyPacket(int index, const DenseBase& other) { OtherDerived& _other = other.const_cast_derived(); ei_internal_assert(index >= 0 && index < m_matrix.size()); -- cgit v1.2.3