implement scalar operators separately for each type using a macro.

This is required e.g. to allow "2 * m" with m a matrix of doubles.
This commit is contained in:
Benoit Jacob
2007-09-27 07:42:12 +00:00
parent 8a024825d2
commit 628b1a8f6d
9 changed files with 50 additions and 41 deletions

View File

@@ -50,7 +50,7 @@ template<typename Lhs, typename Rhs> class MatrixSum
MatrixSum(const MatrixSum& other)
: m_lhs(other.m_lhs), m_rhs(other.m_rhs) {}
INHERIT_ASSIGNMENT_OPERATORS(MatrixSum)
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixSum)
private:
@@ -90,7 +90,7 @@ template<typename Lhs, typename Rhs> class MatrixDifference
MatrixDifference(const MatrixDifference& other)
: m_lhs(other.m_lhs), m_rhs(other.m_rhs) {}
INHERIT_ASSIGNMENT_OPERATORS(MatrixDifference)
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixDifference)
private:
const Ref& _ref() const { return *this; }
@@ -129,7 +129,7 @@ template<typename Lhs, typename Rhs> class MatrixProduct
MatrixProduct(const MatrixProduct& other)
: m_lhs(other.m_lhs), m_rhs(other.m_rhs) {}
INHERIT_ASSIGNMENT_OPERATORS(MatrixProduct)
EIGEN_INHERIT_ASSIGNMENT_OPERATORS(MatrixProduct)
private:
const Ref& _ref() const { return *this; }