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:
@@ -84,8 +84,8 @@ class Matrix : public EigenBase<_Scalar, Matrix<_Scalar, _Rows, _Cols> >,
|
||||
return Base::operator=(other);
|
||||
}
|
||||
|
||||
INHERIT_ASSIGNMENT_OPERATOR(Matrix, +=)
|
||||
INHERIT_ASSIGNMENT_OPERATOR(Matrix, -=)
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Matrix, +=)
|
||||
EIGEN_INHERIT_ASSIGNMENT_OPERATOR(Matrix, -=)
|
||||
|
||||
explicit Matrix(int rows = 1, int cols = 1) : Storage(rows, cols) {}
|
||||
template<typename OtherDerived>
|
||||
@@ -124,6 +124,9 @@ EIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<int>, ci)
|
||||
EIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<float>, cf)
|
||||
EIGEN_MAKE_TYPEDEFS_ALL_SIZES(std::complex<double>, cd)
|
||||
|
||||
#undef EIGEN_MAKE_TYPEDEFS_ALL_SIZES
|
||||
#undef EIGEN_MAKE_TYPEDEFS
|
||||
|
||||
} // namespace Eigen
|
||||
|
||||
#include "MatrixOps.h"
|
||||
|
||||
Reference in New Issue
Block a user