mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
sparse module: makes -= and += operator working
Question 1: why are *=scalar and /=scalar working right away ? Same weirdness in DynamicSparseMatrix where operators += and -= work wihout having to redefine them ???
This commit is contained in:
@@ -235,7 +235,10 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
|
||||
|
||||
VERIFY_IS_APPROX(m1*=s1, refM1*=s1);
|
||||
VERIFY_IS_APPROX(m1/=s1, refM1/=s1);
|
||||
|
||||
|
||||
VERIFY_IS_APPROX(m1+=m2, refM1+=refM2);
|
||||
VERIFY_IS_APPROX(m1-=m2, refM1-=refM2);
|
||||
|
||||
refM4.setRandom();
|
||||
// sparse cwise* dense
|
||||
VERIFY_IS_APPROX(m3.cwise()*refM4, refM3.cwise()*refM4);
|
||||
|
||||
Reference in New Issue
Block a user