mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add operator *= between matrices, with automatic aliasing.
add tutorial in doc/ subdirectory.
This commit is contained in:
@@ -213,7 +213,23 @@ EIGEN_MAKE_MATRIX_OP_EQ(-)
|
||||
|
||||
#undef EIGEN_MAKE_MATRIX_OP_EQ
|
||||
|
||||
template<typename Derived1>
|
||||
template<typename Derived2>
|
||||
MatrixBase<Derived1> &
|
||||
MatrixBase<Derived1>::operator *=(const MatrixBase<Derived2> &mat2)
|
||||
{
|
||||
alias() = *this * mat2;
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename Derived>
|
||||
template<typename Content>
|
||||
MatrixBase<Derived> &
|
||||
MatrixBase<Derived>::operator *=(const MatrixConstXpr<Content> &xpr)
|
||||
{
|
||||
alias() = *this * xpr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
} // namespace Eigen
|
||||
|
||||
|
||||
Reference in New Issue
Block a user