add transposeInPlace (not optimized yet for rectangular matrix)

This commit is contained in:
Gael Guennebaud
2008-10-29 15:24:08 +00:00
parent 48137e28d8
commit ebe14aae7d
4 changed files with 66 additions and 6 deletions

View File

@@ -90,6 +90,14 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
// normalized() in order to produce a consistent result.
VERIFY_IS_APPROX(VectorType::Random(rows).normalized().norm(), RealScalar(1));
}
// check inplace transpose
m3 = m1;
m3.transposeInPlace();
VERIFY_IS_APPROX(m3,m1.transpose());
m3.transposeInPlace();
VERIFY_IS_APPROX(m3,m1);
}
void test_adjoint()