* fix compilation issue in Product

* added some tests for product and swap
* overload .swap() for dynamic-sized matrix of same size
This commit is contained in:
Gael Guennebaud
2008-07-02 16:05:33 +00:00
parent 9433df83a7
commit 8463b7d3f4
8 changed files with 101 additions and 61 deletions

View File

@@ -346,6 +346,17 @@ class Matrix : public MatrixBase<Matrix<_Scalar, _Rows, _Cols, _MaxRows, _MaxCol
{
return *this;
}
/** Override MatrixBase::swap() since for dynamic-sized matrices of same type it is enough to swap the
* data pointers.
*/
void swap(Matrix& other)
{
if (Base::SizeAtCompileTime==Dynamic)
m_storage.swap(other.m_storage);
else
this->Base::swap(other);
}
};
#define EIGEN_MAKE_TYPEDEFS(Type, TypeSuffix, Size, SizeSuffix) \