10#ifndef EIGEN_SPARSEPRODUCT_H
11#define EIGEN_SPARSEPRODUCT_H
26template<
typename Derived>
27template<
typename OtherDerived>
28inline const Product<Derived,OtherDerived,AliasFreeProduct>
37template<
typename Lhs,
typename Rhs,
int ProductType>
40 template<
typename Dest>
41 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
43 evalTo(dst, lhs, rhs,
typename evaluator_traits<Dest>::Shape());
47 template<
typename Dest,
typename ActualLhs>
48 static void addTo(Dest& dst,
const ActualLhs& lhs,
const Rhs& rhs,
typename enable_if<
is_same<
typename evaluator_traits<Dest>::Shape,
DenseShape>::value,
int*>::type* = 0)
52 LhsNested lhsNested(lhs);
53 RhsNested rhsNested(rhs);
55 typename remove_all<RhsNested>::type, Dest>::run(lhsNested,rhsNested,dst);
59 template<
typename Dest>
60 static void subTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs,
typename enable_if<
is_same<
typename evaluator_traits<Dest>::Shape,
DenseShape>::value,
int*>::type* = 0)
62 addTo(dst, -lhs, rhs);
68 template<
typename Dest>
69 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs,
SparseShape)
73 LhsNested lhsNested(lhs);
74 RhsNested rhsNested(rhs);
76 typename remove_all<RhsNested>::type, Dest>::run(lhsNested,rhsNested,dst);
80 template<
typename Dest>
81 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs,
DenseShape)
89template<
typename Lhs,
typename Rhs,
int ProductType>
95template<
typename Lhs,
typename Rhs,
int ProductType>
101template<
typename DstXprType,
typename Lhs,
typename Rhs>
107 Index dstRows = src.rows();
108 Index dstCols = src.cols();
109 if((dst.rows()!=dstRows) || (dst.cols()!=dstCols))
110 dst.resize(dstRows, dstCols);
117template<
typename DstXprType,
typename Lhs,
typename Rhs>
128template<
typename DstXprType,
typename Lhs,
typename Rhs>
138template<
typename Lhs,
typename Rhs,
int Options>
140 :
public evaluator<typename Product<Lhs, Rhs, DefaultProduct>::PlainObject>
147 : m_result(xpr.rows(), xpr.cols())
150 ::new (
static_cast<Base*
>(
this))
Base(m_result);
157 typename remove_all<RhsNested>::type,
PlainObject>::run(lhsNested,rhsNested,m_result,
158 abs(xpr.reference())*xpr.epsilon());
168template<
typename Scalar,
int _Options,
typename _StorageIndex>
169template<
typename Lhs,
typename Rhs>
Expression of the product of two arbitrary matrices or vectors.
Definition Product.h:75
Base class of any sparse matrices or sparse expressions.
Definition SparseMatrixBase.h:28
A versatible sparse matrix representation.
Definition SparseMatrix.h:98
Expression of a dense or sparse matrix with zero or too small values removed.
Definition SparseView.h:46
const internal::remove_all< MatrixTypeNested >::type & nestedExpression() const
Definition SparseView.h:66
Namespace containing all symbols from the Eigen library.
Definition common.h:81
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition Constants.h:528
Definition Constants.h:537
Definition AssignEvaluator.h:824
Definition Constants.h:545
Definition SparseAssign.h:62
Definition SparseUtil.h:137
Definition AssignmentFunctors.h:46
Definition AssignmentFunctors.h:21
Definition ConservativeSparseSparseProduct.h:131
Definition CoreEvaluators.h:91
Definition ProductEvaluators.h:86
Definition SparseSparseProductWithPruning.h:84
Definition ConservativeSparseSparseProduct.h:304
Definition AssignmentFunctors.h:67
Definition CoreEvaluators.h:65