aboutsummaryrefslogtreecommitdiff
path: root/Eigen/src/SparseCore/SparseProduct.h
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2022-02-25 15:53:09 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-02-25 15:53:09 +0000
commit10f298fc4175c1b8537c674f654a070c871960e5 (patch)
treefb979fb4cf4f8052c8cc66b1ec9516d91fcd859b /Eigen/src/SparseCore/SparseProduct.h
parent892aea0d75825c43d5b630e2060622cbba23694c (diff)
parent79df15ea886a5fc1b85de433f9b3518c68934bae (diff)
downloadeigen-android-games-sdk-games-controller-release.tar.gz
Original change: https://android-review.googlesource.com/c/platform/external/eigen/+/1999079 Change-Id: I0c5108390c595f0d39af8797875f2b88accb7b56
Diffstat (limited to 'Eigen/src/SparseCore/SparseProduct.h')
-rw-r--r--Eigen/src/SparseCore/SparseProduct.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/Eigen/src/SparseCore/SparseProduct.h b/Eigen/src/SparseCore/SparseProduct.h
index 4cbf68781..af8a7744d 100644
--- a/Eigen/src/SparseCore/SparseProduct.h
+++ b/Eigen/src/SparseCore/SparseProduct.h
@@ -17,7 +17,7 @@ namespace Eigen {
* The automatic pruning of the small values can be achieved by calling the pruned() function
* in which case a totally different product algorithm is employed:
* \code
- * C = (A*B).pruned(); // supress numerical zeros (exact)
+ * C = (A*B).pruned(); // suppress numerical zeros (exact)
* C = (A*B).pruned(ref);
* C = (A*B).pruned(ref,epsilon);
* \endcode
@@ -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