From 902750826b52de97f2cd48d91fcf4f70d874e93c Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 4 Nov 2015 17:42:07 +0100 Subject: Add support for dense.cwiseProduct(sparse) This also fixes a regression regarding (dense*sparse).diagonal() --- Eigen/src/Core/MatrixBase.h | 9 +++++++++ Eigen/src/Core/util/ForwardDeclarations.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'Eigen/src/Core') diff --git a/Eigen/src/Core/MatrixBase.h b/Eigen/src/Core/MatrixBase.h index b5afff005..9d612c852 100644 --- a/Eigen/src/Core/MatrixBase.h +++ b/Eigen/src/Core/MatrixBase.h @@ -438,6 +438,15 @@ template class MatrixBase template void applyOnTheRight(Index p, Index q, const JacobiRotation& j); +///////// SparseCore module ///////// + + template + EIGEN_STRONG_INLINE const typename SparseMatrixBase::template CwiseProductDenseReturnType::Type + cwiseProduct(const SparseMatrixBase &other) const + { + return other.cwiseProduct(derived()); + } + ///////// MatrixFunctions module ///////// typedef typename internal::stem_function::type StemFunction; diff --git a/Eigen/src/Core/util/ForwardDeclarations.h b/Eigen/src/Core/util/ForwardDeclarations.h index c2d5f4316..34697765d 100644 --- a/Eigen/src/Core/util/ForwardDeclarations.h +++ b/Eigen/src/Core/util/ForwardDeclarations.h @@ -265,7 +265,6 @@ template class Rotation2D; template class AngleAxis; template class Translation; template class AlignedBox; - template class Quaternion; template class Transform; template class ParametrizedLine; @@ -273,6 +272,9 @@ template class Hyperp template class UniformScaling; template class Homogeneous; +// Sparse module: +template class SparseMatrixBase; + // MatrixFunctions module template struct MatrixExponentialReturnValue; template class MatrixFunctionReturnValue; -- cgit v1.2.3