add operator *= between matrices, with automatic aliasing.

add tutorial in doc/ subdirectory.
This commit is contained in:
Benoit Jacob
2007-09-07 08:18:21 +00:00
parent c030e570fd
commit 61158b1922
5 changed files with 82 additions and 1 deletions

View File

@@ -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