diff options
Diffstat (limited to 'Eigen/src/SparseCore/SparseProduct.h')
-rw-r--r-- | Eigen/src/SparseCore/SparseProduct.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Eigen/src/SparseCore/SparseProduct.h b/Eigen/src/SparseCore/SparseProduct.h index c495a7398..af8a7744d 100644 --- a/Eigen/src/SparseCore/SparseProduct.h +++ b/Eigen/src/SparseCore/SparseProduct.h @@ -164,6 +164,18 @@ protected: } // end namespace internal +// sparse matrix = sparse-product (can be sparse*sparse, sparse*perm, etc.) +template<typename Scalar, int _Options, typename _StorageIndex> +template<typename Lhs, typename Rhs> +SparseMatrix<Scalar,_Options,_StorageIndex>& SparseMatrix<Scalar,_Options,_StorageIndex>::operator=(const Product<Lhs,Rhs,AliasFreeProduct>& src) +{ + // std::cout << "in Assignment : " << DstOptions << "\n"; + SparseMatrix dst(src.rows(),src.cols()); + internal::generic_product_impl<Lhs, Rhs>::evalTo(dst,src.lhs(),src.rhs()); + this->swap(dst); + return *this; +} + } // end namespace Eigen #endif // EIGEN_SPARSEPRODUCT_H |