mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
bug #632: add support for "dense +/- sparse" operations. The current implementation is based on SparseView to make the dense subexpression compatible with the sparse one.
This commit is contained in:
@@ -192,6 +192,11 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
|
||||
VERIFY_IS_APPROX(refM4.cwiseProduct(m3), refM4.cwiseProduct(refM3));
|
||||
// VERIFY_IS_APPROX(m3.cwise()/refM4, refM3.cwise()/refM4);
|
||||
|
||||
VERIFY_IS_APPROX(refM4 + m3, refM4 + refM3);
|
||||
VERIFY_IS_APPROX(m3 + refM4, refM3 + refM4);
|
||||
VERIFY_IS_APPROX(refM4 - m3, refM4 - refM3);
|
||||
VERIFY_IS_APPROX(m3 - refM4, refM3 - refM4);
|
||||
|
||||
// test aliasing
|
||||
VERIFY_IS_APPROX((m1 = -m1), (refM1 = -refM1));
|
||||
VERIFY_IS_APPROX((m1 = m1.transpose()), (refM1 = refM1.transpose().eval()));
|
||||
|
||||
Reference in New Issue
Block a user