diff options
author | 2012-10-03 09:06:19 +0200 | |
---|---|---|
committer | 2012-10-03 09:06:19 +0200 | |
commit | fec6df1f7dc4da6de865cc024c45aee5dbb64d88 (patch) | |
tree | 1fc2a900f3e3bbf76e485cab82cf10afba0a8f51 /Eigen | |
parent | f30ca7ed7e1c756fcc76389ddbc361486f7d8c42 (diff) |
fix dense=sparse*diagonal (there was an issue in the values returned by the .outer() function of the related iterators)
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/SparseCore/SparseDiagonalProduct.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Eigen/src/SparseCore/SparseDiagonalProduct.h b/Eigen/src/SparseCore/SparseDiagonalProduct.h index 095bf6863..ccba02124 100644 --- a/Eigen/src/SparseCore/SparseDiagonalProduct.h +++ b/Eigen/src/SparseCore/SparseDiagonalProduct.h @@ -126,11 +126,15 @@ class sparse_diagonal_product_inner_iterator_selector SparseInnerVectorSet<Rhs,1>, typename Lhs::DiagonalVectorType>::InnerIterator Base; typedef typename Lhs::Index Index; + Index m_outer; public: inline sparse_diagonal_product_inner_iterator_selector( const SparseDiagonalProductType& expr, Index outer) - : Base(expr.rhs().innerVector(outer) .cwiseProduct(expr.lhs().diagonal()), 0) + : Base(expr.rhs().innerVector(outer) .cwiseProduct(expr.lhs().diagonal()), 0), m_outer(outer) {} + + inline Index outer() const { return m_outer; } + inline Index col() const { return m_outer; } }; template<typename Lhs, typename Rhs, typename SparseDiagonalProductType> @@ -160,11 +164,15 @@ class sparse_diagonal_product_inner_iterator_selector SparseInnerVectorSet<Lhs,1>, Transpose<const typename Rhs::DiagonalVectorType> >::InnerIterator Base; typedef typename Lhs::Index Index; + Index m_outer; public: inline sparse_diagonal_product_inner_iterator_selector( const SparseDiagonalProductType& expr, Index outer) - : Base(expr.lhs().innerVector(outer) .cwiseProduct(expr.rhs().diagonal().transpose()), 0) + : Base(expr.lhs().innerVector(outer) .cwiseProduct(expr.rhs().diagonal().transpose()), 0), m_outer(outer) {} + + inline Index outer() const { return m_outer; } + inline Index row() const { return m_outer; } }; } // end namespace internal |