10 #ifndef EIGEN_SPARSEPRODUCT_H 11 #define EIGEN_SPARSEPRODUCT_H 26 template<
typename Derived>
27 template<
typename OtherDerived>
28 inline const Product<Derived,OtherDerived,AliasFreeProduct>
37 template<
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);
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);
80 template<
typename Dest>
81 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs,
DenseShape)
89 template<
typename Lhs,
typename Rhs,
int ProductType>
95 template<
typename Lhs,
typename Rhs,
int ProductType>
101 template<
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);
117 template<
typename DstXprType,
typename Lhs,
typename Rhs>
128 template<
typename DstXprType,
typename Lhs,
typename Rhs>
138 template<
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);
158 abs(xpr.reference())*xpr.epsilon());
162 PlainObject m_result;
169 #endif // EIGEN_SPARSEPRODUCT_H Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:71
A versatible sparse matrix representation.
Definition: SparseMatrix.h:92
Definition: SparseSparseProductWithPruning.h:83
Definition: AssignmentFunctors.h:67
Definition: CoreEvaluators.h:90
Definition: CoreEvaluators.h:65
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:85
Definition: Constants.h:521
Definition: Constants.h:512
Definition: Constants.h:529
Definition: AssignmentFunctors.h:21
Definition: AssignEvaluator.h:753
Base class of any sparse matrices or sparse expressions.
Definition: ForwardDeclarations.h:281
Definition: ConservativeSparseSparseProduct.h:129
Definition: ProductEvaluators.h:86
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:33
Definition: SparseAssign.h:62
Definition: ForwardDeclarations.h:126
Definition: ConservativeSparseSparseProduct.h:297
Definition: SparseUtil.h:137
Definition: BandTriangularSolver.h:13
Definition: AssignmentFunctors.h:46
Generic expression where a coefficient-wise unary operator is applied to an expression.
Definition: CwiseUnaryOp.h:55
const internal::remove_all< MatrixTypeNested >::type & nestedExpression() const
Definition: SparseView.h:52