From 84fdbded4d8a7fae0cbd6fb5836f2aa0e442f356 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 15 Jul 2010 20:39:20 +0200 Subject: add support for strictly triangular matrix in trmm though it is not really useful --- test/product_trmm.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/product_trmm.cpp') diff --git a/test/product_trmm.cpp b/test/product_trmm.cpp index e20b408c4..e4790fb66 100644 --- a/test/product_trmm.cpp +++ b/test/product_trmm.cpp @@ -35,7 +35,7 @@ template void trmm(int size,int /*othersize*/) DenseIndex cols = ei_random(1,size); MatrixColMaj triV(rows,cols), triH(cols,rows), upTri(cols,rows), loTri(rows,cols), - unitUpTri(cols,rows), unitLoTri(rows,cols); + unitUpTri(cols,rows), unitLoTri(rows,cols), strictlyUpTri(cols,rows), strictlyLoTri(rows,cols); MatrixColMaj ge1(rows,cols), ge2(cols,rows), ge3; MatrixRowMaj rge3; @@ -48,6 +48,8 @@ template void trmm(int size,int /*othersize*/) upTri = triH.template triangularView(); unitLoTri = triV.template triangularView(); unitUpTri = triH.template triangularView(); + strictlyLoTri = triV.template triangularView(); + strictlyUpTri = triH.template triangularView(); ge1.setRandom(); ge2.setRandom(); @@ -72,6 +74,11 @@ template void trmm(int size,int /*othersize*/) VERIFY_IS_APPROX( rge3.noalias() = ge2 * triV.template triangularView(), ge2 * unitLoTri); VERIFY_IS_APPROX( ge3 = ge2 * triV.template triangularView(), ge2 * unitLoTri); VERIFY_IS_APPROX( ge3 = (s1*triV).adjoint().template triangularView() * ge2.adjoint(), ei_conj(s1) * unitLoTri.adjoint() * ge2.adjoint()); + + VERIFY_IS_APPROX( ge3 = triV.template triangularView() * ge2, strictlyLoTri * ge2); + VERIFY_IS_APPROX( rge3.noalias() = ge2 * triV.template triangularView(), ge2 * strictlyLoTri); + VERIFY_IS_APPROX( ge3 = ge2 * triV.template triangularView(), ge2 * strictlyLoTri); + VERIFY_IS_APPROX( ge3 = (s1*triV).adjoint().template triangularView() * ge2.adjoint(), ei_conj(s1) * strictlyLoTri.adjoint() * ge2.adjoint()); } void test_product_trmm() -- cgit v1.2.3