From e313826890f581f1b9665422bab7b83b9daf5bfd Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 25 Jun 2010 11:36:38 +0200 Subject: add mixed sparse-dense outer product --- Eigen/src/Sparse/SparseMatrixBase.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Eigen/src/Sparse/SparseMatrixBase.h') diff --git a/Eigen/src/Sparse/SparseMatrixBase.h b/Eigen/src/Sparse/SparseMatrixBase.h index 12a1cb538..5ca3b604b 100644 --- a/Eigen/src/Sparse/SparseMatrixBase.h +++ b/Eigen/src/Sparse/SparseMatrixBase.h @@ -362,15 +362,15 @@ template class SparseMatrixBase : public EigenBase operator*(const DiagonalBase &lhs, const SparseMatrixBase& rhs) { return SparseDiagonalProduct(lhs.derived(), rhs.derived()); } - // dense * sparse (return a dense object) + /** dense * sparse (return a dense object unless it is an outer product) */ template friend - const DenseTimeSparseProduct + const typename DenseSparseProductReturnType::Type operator*(const MatrixBase& lhs, const Derived& rhs) - { return DenseTimeSparseProduct(lhs.derived(),rhs); } + { return typename DenseSparseProductReturnType::Type(lhs.derived(),rhs); } - // sparse * dense (returns a dense object) + /** sparse * dense (returns a dense object unless it is an outer product) */ template - const SparseTimeDenseProduct + const typename SparseDenseProductReturnType::Type operator*(const MatrixBase &other) const; template -- cgit v1.2.3