aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sparse_product.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/sparse_product.cpp')
-rw-r--r--test/sparse_product.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/sparse_product.cpp b/test/sparse_product.cpp
index 338c3d378..51eed428b 100644
--- a/test/sparse_product.cpp
+++ b/test/sparse_product.cpp
@@ -201,7 +201,16 @@ template<typename SparseMatrixType> void sparse_product()
VERIFY_IS_APPROX(x=mUp.template selfadjointView<Upper>()*b, refX=refS*b);
VERIFY_IS_APPROX(x=mLo.template selfadjointView<Lower>()*b, refX=refS*b);
VERIFY_IS_APPROX(x=mS.template selfadjointView<Upper|Lower>()*b, refX=refS*b);
+
+ // sparse selfadjointView * sparse
+ SparseMatrixType mSres(rows,rows);
+ VERIFY_IS_APPROX(mSres = mLo.template selfadjointView<Lower>()*mS,
+ refX = refLo.template selfadjointView<Lower>()*refS);
+ // sparse * sparse selfadjointview
+ VERIFY_IS_APPROX(mSres = mS * mLo.template selfadjointView<Lower>(),
+ refX = refS * refLo.template selfadjointView<Lower>());
}
+
}
// New test for Bug in SparseTimeDenseProduct