Add support for dense.cwiseProduct(sparse)

This also fixes a regression regarding (dense*sparse).diagonal()
This commit is contained in:
Gael Guennebaud
2015-11-04 17:42:07 +01:00
parent f6b1deebab
commit 902750826b
6 changed files with 26 additions and 16 deletions

View File

@@ -188,6 +188,8 @@ template<typename SparseMatrixType> void sparse_basic(const SparseMatrixType& re
refM4.setRandom();
// sparse cwise* dense
VERIFY_IS_APPROX(m3.cwiseProduct(refM4), refM3.cwiseProduct(refM4));
// dense cwise* sparse
VERIFY_IS_APPROX(refM4.cwiseProduct(m3), refM4.cwiseProduct(refM3));
// VERIFY_IS_APPROX(m3.cwise()/refM4, refM3.cwise()/refM4);
// test aliasing