aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/product_trmv.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2010-06-17 10:17:22 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2010-06-17 10:17:22 +0200
commit7fdf2189516e2d4548c04ed4e18b7a28c28eb77c (patch)
treec9398497b4f5905d355a22f81800c561fc7e38c3 /test/product_trmv.cpp
parent6bff339cc59bba33fc192555fafc673684b95295 (diff)
makes trmv works with the triangular matrix on the right
Diffstat (limited to 'test/product_trmv.cpp')
-rw-r--r--test/product_trmv.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/product_trmv.cpp b/test/product_trmv.cpp
index f0962557a..2f5743187 100644
--- a/test/product_trmv.cpp
+++ b/test/product_trmv.cpp
@@ -76,6 +76,12 @@ template<typename MatrixType> void trmv(const MatrixType& m)
VERIFY((m3.adjoint() * (s1*v1.conjugate())).isApprox(m1.adjoint().template triangularView<Eigen::Upper>() * (s1*v1.conjugate()), largerEps));
m3 = m1.template triangularView<Eigen::UnitUpper>();
+ // check transposed cases:
+ m3 = m1.template triangularView<Eigen::Lower>();
+ VERIFY((v1.transpose() * m3).isApprox(v1.transpose() * m1.template triangularView<Eigen::Lower>(), largerEps));
+ VERIFY((v1.adjoint() * m3).isApprox(v1.adjoint() * m1.template triangularView<Eigen::Lower>(), largerEps));
+ VERIFY((v1.adjoint() * m3.adjoint()).isApprox(v1.adjoint() * m1.template triangularView<Eigen::Lower>().adjoint(), largerEps));
+
// TODO check with sub-matrices
}