10 #ifndef EIGEN_SPARSEPRODUCT_H
11 #define EIGEN_SPARSEPRODUCT_H
26 template<
typename Derived>
27 template<
typename OtherDerived>
28 inline const Product<Derived,OtherDerived>
37 template<
typename Lhs,
typename Rhs,
int ProductType>
38 struct generic_product_impl<Lhs, Rhs, SparseShape, SparseShape, ProductType>
40 template<
typename Dest>
41 static void evalTo(Dest& dst,
const Lhs& lhs,
const Rhs& rhs)
43 typedef typename nested_eval<Lhs,Dynamic>::type LhsNested;
44 typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;
45 LhsNested lhsNested(lhs);
46 RhsNested rhsNested(rhs);
47 internal::conservative_sparse_sparse_product_selector<typename remove_all<LhsNested>::type,
48 typename remove_all<RhsNested>::type, Dest>::run(lhsNested,rhsNested,dst);
53 template<
typename Lhs,
typename Rhs,
int ProductType>
54 struct generic_product_impl<Lhs, Rhs, SparseShape, SparseTriangularShape, ProductType>
55 :
public generic_product_impl<Lhs, Rhs, SparseShape, SparseShape, ProductType>
59 template<
typename Lhs,
typename Rhs,
int ProductType>
60 struct generic_product_impl<Lhs, Rhs, SparseTriangularShape, SparseShape, ProductType>
61 :
public generic_product_impl<Lhs, Rhs, SparseShape, SparseShape, ProductType>
64 template<
typename Lhs,
typename Rhs,
int Options>
65 struct evaluator<SparseView<Product<Lhs, Rhs, Options> > >
66 :
public evaluator<typename Product<Lhs, Rhs, DefaultProduct>::PlainObject>
68 typedef SparseView<Product<Lhs, Rhs, Options> > XprType;
69 typedef typename XprType::PlainObject PlainObject;
70 typedef evaluator<PlainObject> Base;
72 explicit evaluator(
const XprType& xpr)
73 : m_result(xpr.rows(), xpr.cols())
76 ::new (static_cast<Base*>(
this)) Base(m_result);
77 typedef typename nested_eval<Lhs,Dynamic>::type LhsNested;
78 typedef typename nested_eval<Rhs,Dynamic>::type RhsNested;
79 LhsNested lhsNested(xpr.nestedExpression().lhs());
80 RhsNested rhsNested(xpr.nestedExpression().rhs());
82 internal::sparse_sparse_product_with_pruning_selector<typename remove_all<LhsNested>::type,
83 typename remove_all<RhsNested>::type, PlainObject>::run(lhsNested,rhsNested,m_result,
84 abs(xpr.reference())*xpr.epsilon());
95 #endif // EIGEN_SPARSEPRODUCT_H
Expression of the product of two arbitrary matrices or vectors.
Definition: Product.h:107
Derived & derived()
Definition: EigenBase.h:44
Base class of any sparse matrices or sparse expressions.
Definition: SparseMatrixBase.h:26
const ScalarMultipleReturnType operator*(const Scalar &scalar) const
Definition: SparseMatrixBase.h:57
Definition: Eigen_Colamd.h:54