diff options
author | Gael Guennebaud <g.gael@free.fr> | 2014-07-01 11:50:20 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2014-07-01 11:50:20 +0200 |
commit | 441f97b2df8465cb8d5c601e9f1ed324af71491e (patch) | |
tree | 1e1b6e64f19ab6fa156b8948dbfda7713ec23b3a /Eigen/src/SparseCore/SparseMatrixBase.h | |
parent | 0ad7a644df5c71b9a75c0300210ce17985b88044 (diff) |
Implement evaluators for sparse * sparse products
Diffstat (limited to 'Eigen/src/SparseCore/SparseMatrixBase.h')
-rw-r--r-- | Eigen/src/SparseCore/SparseMatrixBase.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Eigen/src/SparseCore/SparseMatrixBase.h b/Eigen/src/SparseCore/SparseMatrixBase.h index c71244d3e..cebf3990d 100644 --- a/Eigen/src/SparseCore/SparseMatrixBase.h +++ b/Eigen/src/SparseCore/SparseMatrixBase.h @@ -190,8 +190,10 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived> public: +#ifndef EIGEN_TEST_EVALUATORS template<typename Lhs, typename Rhs> inline Derived& operator=(const SparseSparseProduct<Lhs,Rhs>& product); +#endif friend std::ostream & operator << (std::ostream & s, const SparseMatrixBase& m) { @@ -264,12 +266,12 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived> EIGEN_STRONG_INLINE const EIGEN_SPARSE_CWISE_PRODUCT_RETURN_TYPE cwiseProduct(const MatrixBase<OtherDerived> &other) const; +#ifndef EIGEN_TEST_EVALUATORS // sparse * sparse template<typename OtherDerived> const typename SparseSparseProductReturnType<Derived,OtherDerived>::Type operator*(const SparseMatrixBase<OtherDerived> &other) const; - -#ifndef EIGEN_TEST_EVALUATORS + // sparse * diagonal template<typename OtherDerived> const SparseDiagonalProduct<Derived,OtherDerived> @@ -292,6 +294,11 @@ template<typename Derived> class SparseMatrixBase : public EigenBase<Derived> const Product<OtherDerived,Derived> operator*(const DiagonalBase<OtherDerived> &lhs, const SparseMatrixBase& rhs) { return Product<OtherDerived,Derived>(lhs.derived(), rhs.derived()); } + + // sparse * sparse + template<typename OtherDerived> + const Product<Derived,OtherDerived> + operator*(const SparseMatrixBase<OtherDerived> &other) const; #endif // EIGEN_TEST_EVALUATORS /** dense * sparse (return a dense object unless it is an outer product) */ |