From 92da574ec291b32b6f0b645a1d82045eb280437a Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sun, 21 Mar 2010 11:28:03 -0400 Subject: * allow matrix dimensions to be 0 (also at compile time) and provide a specialization of ei_matrix_array for size 0 * adapt many xprs to have the right storage order, now that it matters * add static assert on expressions to check that vector xprs have the righ storage order * adapt ei_plain_matrix_type_(column|row)_major * implement assignment of selfadjointview to matrix (was before failing to compile) and add nestedExpression() methods * expand product_symm test * in ei_gemv_selector, use the PlainObject type instead of a custom Matrix<...> type * fix VectorBlock and Block mistakes --- test/product_symm.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'test/product_symm.cpp') diff --git a/test/product_symm.cpp b/test/product_symm.cpp index 4ff1735d6..08e0a6070 100644 --- a/test/product_symm.cpp +++ b/test/product_symm.cpp @@ -48,13 +48,14 @@ template void symm(int size = Size, in typedef Matrix MatrixType; typedef Matrix Rhs1; typedef Matrix Rhs2; - typedef Matrix Rhs3; + enum { order = OtherSize==1 ? 0 : RowMajor }; + typedef Matrix Rhs3; int rows = size; int cols = size; MatrixType m1 = MatrixType::Random(rows, cols), - m2 = MatrixType::Random(rows, cols); + m2 = MatrixType::Random(rows, cols), m3; m1 = (m1+m1.adjoint()).eval(); @@ -66,10 +67,14 @@ template void symm(int size = Size, in s2 = ei_random(); m2 = m1.template triangularView(); + m3 = m2.template selfadjointView(); + VERIFY_IS_EQUAL(m1, m3); VERIFY_IS_APPROX(rhs12 = (s1*m2).template selfadjointView() * (s2*rhs1), rhs13 = (s1*m1) * (s2*rhs1)); m2 = m1.template triangularView(); rhs12.setRandom(); rhs13 = rhs12; + m3 = m2.template selfadjointView(); + VERIFY_IS_EQUAL(m1, m3); VERIFY_IS_APPROX(rhs12 += (s1*m2).template selfadjointView() * (s2*rhs1), rhs13 += (s1*m1) * (s2*rhs1)); -- cgit v1.2.3