From 9f035c876a9d84f32b39bacba179e9b2a542b57c Mon Sep 17 00:00:00 2001 From: Desire NUENTSA Date: Fri, 28 Jun 2013 22:27:45 +0200 Subject: Fiw bug #553: add support for sparse matrix time sparse self-adjoint view products --- Eigen/src/SparseCore/SparseSelfAdjointView.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Eigen/src/SparseCore') diff --git a/Eigen/src/SparseCore/SparseSelfAdjointView.h b/Eigen/src/SparseCore/SparseSelfAdjointView.h index d2e170410..1770f21e6 100644 --- a/Eigen/src/SparseCore/SparseSelfAdjointView.h +++ b/Eigen/src/SparseCore/SparseSelfAdjointView.h @@ -69,6 +69,22 @@ template class SparseSelfAdjointView const _MatrixTypeNested& matrix() const { return m_matrix; } _MatrixTypeNested& matrix() { return m_matrix.const_cast_derived(); } + /** Sparse self-adjoint matrix times sparse matrix product */ + template + SparseSparseProduct::Flags&RowMajorBit) ? RowMajor : ColMajor,Index>, OtherDerived> + operator*(const SparseMatrixBase& rhs) const + { + return SparseSparseProduct::Flags&RowMajorBit) ? RowMajor : ColMajor, Index>, OtherDerived>(*this, rhs.derived()); + } + + /**sparse matrix times Sparse self-adjoint matrix product */ + template friend + SparseSparseProduct::Flags&RowMajorBit) ? RowMajor : ColMajor,Index> > + operator*(const SparseMatrixBase& lhs, const SparseSelfAdjointView& rhs) + { + return SparseSparseProduct< OtherDerived, SparseMatrix::Flags&RowMajorBit) ? RowMajor : ColMajor, Index> >(lhs.derived(), rhs.derived()); + } + /** Efficient sparse self-adjoint matrix times dense vector/matrix product */ template SparseSelfAdjointTimeDenseProduct -- cgit v1.2.3