mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user