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 fd074be1a0
commit c030925a66
6 changed files with 26 additions and 15 deletions

View File

@@ -306,6 +306,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