From 9ea5e0e37652a66ce1ceaafd5b9618935a8adf65 Mon Sep 17 00:00:00 2001 From: fangs124 Date: Wed, 24 Apr 2024 16:54:59 +0700 Subject: [PATCH] added a test for mul_tr, physically transposing a (column) vector. --- tests/core/matrix.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/core/matrix.rs b/tests/core/matrix.rs index ef49ee68..ce067e9b 100644 --- a/tests/core/matrix.rs +++ b/tests/core/matrix.rs @@ -923,10 +923,11 @@ mod transposition_tests { fn tr_mul_is_transpose_then_mul(m in matrix(PROPTEST_F64, Const::<4>, Const::<6>), v in vector4()) { prop_assert!(relative_eq!(m.transpose() * v, m.tr_mul(&v), epsilon = 1.0e-7)) } - //#[test] - //fn mul_tr_is_transpose_rhs_then_mul(m in matrix(PROPTEST_F64, Const::<4>, Const::<6>), v in vector4()) { - // prop_assert!(relative_eq!(m * v.transpose(), m.mul_tr(&v), epsilon = 1.0e-7)) - //} + + #[test] //this one gives an error + fn mul_tr_is_transpose_rhs_then_mul(m in matrix(PROPTEST_F64, Const::<6>, Const::<4>), v in vector4()) { + prop_assert!(relative_eq!(m * v, m.mul_tr(&v.transpose()), epsilon = 1.0e-7)) + } } }