mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
* find the proper way of nesting the expression in Flagged:
finally that's more subtle than just using ei_nested, because when flagging with NestByValueBit we want to store the expression by value already, regardless of whether it already had the NestByValueBit set. * rename temporary() ----> nestByValue() * move the old Product.h to disabled/, replace by what was ProductWIP.h * tweak -O and -g flags for tests and examples * reorder the tests -- basic things go first * simplifications, e.g. in many methoeds return derived() and count on implicit casting to the actual return type. * strip some not-really-useful stuff from the heaviest tests
This commit is contained in:
@@ -51,23 +51,15 @@ template<typename MatrixType> void adjoint(const MatrixType& m)
|
||||
Scalar s1 = ei_random<Scalar>(),
|
||||
s2 = ei_random<Scalar>();
|
||||
|
||||
// check involutivity of adjoint, transpose, conjugate
|
||||
VERIFY_IS_APPROX(m1.transpose().transpose(), m1);
|
||||
VERIFY_IS_APPROX(m1.conjugate().conjugate(), m1);
|
||||
VERIFY_IS_APPROX(m1.adjoint().adjoint(), m1);
|
||||
|
||||
// check basic compatibility of adjoint, transpose, conjugate
|
||||
VERIFY_IS_APPROX(m1.transpose().conjugate().adjoint(), m1);
|
||||
VERIFY_IS_APPROX(m1.adjoint().conjugate().transpose(), m1);
|
||||
if(!NumTraits<Scalar>::IsComplex)
|
||||
VERIFY_IS_APPROX(m1.adjoint().transpose(), m1);
|
||||
|
||||
// check multiplicative behavior
|
||||
VERIFY_IS_APPROX((m1.transpose() * m2).transpose(), m2.transpose() * m1);
|
||||
std::cout << (m1.adjoint() * m2).adjoint() << std::endl;
|
||||
std::cout << "------------------------------" << std::endl;
|
||||
std::cout << m2.adjoint() * m1 << std::endl;
|
||||
VERIFY_IS_APPROX((m1.adjoint() * m2).adjoint(), m2.adjoint() * m1);
|
||||
VERIFY_IS_APPROX((m1.transpose() * m2).conjugate(), m1.adjoint() * m2.conjugate());
|
||||
VERIFY_IS_APPROX((s1 * m1).transpose(), s1 * m1.transpose());
|
||||
VERIFY_IS_APPROX((s1 * m1).conjugate(), ei_conj(s1) * m1.conjugate());
|
||||
VERIFY_IS_APPROX((s1 * m1).adjoint(), ei_conj(s1) * m1.adjoint());
|
||||
|
||||
// check basic properties of dot, norm, norm2
|
||||
|
||||
Reference in New Issue
Block a user