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)
47 template<
typename Dest,
typename ActualLhs>
52 LhsNested lhsNested(lhs);
53 RhsNested rhsNested(rhs);
59 template<
typename Dest>
62 addTo(dst, -lhs, rhs);
68 template<
typename Dest>
73 LhsNested lhsNested(lhs);
74 RhsNested rhsNested(rhs);
80 template<
typename Dest>
89template<
typename Lhs,
typename Rhs,
int ProductType>
95template<
typename Lhs,
typename Rhs,
int ProductType>
101template<
typename DstXprType,
typename Lhs,
typename Rhs>
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);
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
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const LhsNestedCleaned & lhs() const
Definition: Product.h:107
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const RhsNestedCleaned & rhs() const
Definition: Product.h:109
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index cols() const EIGEN_NOEXCEPT
Definition: Product.h:104
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE EIGEN_CONSTEXPR Index rows() const EIGEN_NOEXCEPT
Definition: Product.h:102
Base class of any sparse matrices or sparse expressions.
Definition: SparseMatrixBase.h:28
const Product< Derived, OtherDerived > operator*(const DiagonalBase< OtherDerived > &other) const
Definition: SparseMatrixBase.h:302
const Derived & derived() const
Definition: SparseMatrixBase.h:143
A versatible sparse matrix representation.
Definition: SparseMatrix.h:98
SparseMatrix & operator=(const SparseMatrix &other)
Definition: SparseMatrix.h:759
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
Scalar reference() const
Definition: SparseView.h:68
RealScalar epsilon() const
Definition: SparseView.h:69
type
Definition: core.h:575
UnitType abs(const UnitType x) noexcept
Compute absolute value.
Definition: math.h:721
EIGEN_STRONG_INLINE void swap(T &a, T &b)
Definition: Meta.h:766
Namespace containing all symbols from the Eigen library.
Definition: Core:141
@ AliasFreeProduct
Definition: Constants.h:500
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74
Definition: Eigen_Colamd.h:50
Definition: Constants.h:528
Definition: Constants.h:537
Product< Lhs, Rhs, AliasFreeProduct > SrcXprType
Definition: SparseProduct.h:131
static void run(DstXprType &dst, const SrcXprType &src, const internal::sub_assign_op< typename DstXprType::Scalar, typename SrcXprType::Scalar > &)
Definition: SparseProduct.h:132
static void run(DstXprType &dst, const SrcXprType &src, const internal::add_assign_op< typename DstXprType::Scalar, typename SrcXprType::Scalar > &)
Definition: SparseProduct.h:121
Product< Lhs, Rhs, AliasFreeProduct > SrcXprType
Definition: SparseProduct.h:120
static void run(DstXprType &dst, const SrcXprType &src, const internal::assign_op< typename DstXprType::Scalar, typename SrcXprType::Scalar > &)
Definition: SparseProduct.h:105
Product< Lhs, Rhs, AliasFreeProduct > SrcXprType
Definition: SparseProduct.h:104
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
storage_kind_to_shape< typenametraits< T >::StorageKind >::Shape Shape
Definition: CoreEvaluators.h:74
Definition: CoreEvaluators.h:91
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, DenseShape)
Definition: SparseProduct.h:81
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)
Definition: SparseProduct.h:48
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs, SparseShape)
Definition: SparseProduct.h:69
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)
Definition: SparseProduct.h:60
static void evalTo(Dest &dst, const Lhs &lhs, const Rhs &rhs)
Definition: SparseProduct.h:41
Definition: ProductEvaluators.h:86
T type
Definition: Meta.h:126
Definition: SparseSparseProductWithPruning.h:84
Definition: ConservativeSparseSparseProduct.h:304
Definition: AssignmentFunctors.h:67
evaluator< PlainObject > Base
Definition: SparseProduct.h:144
SparseView< Product< Lhs, Rhs, Options > > XprType
Definition: SparseProduct.h:142
XprType::PlainObject PlainObject
Definition: SparseProduct.h:143
unary_evaluator(const XprType &xpr)
Definition: SparseProduct.h:146
PlainObject m_result
Definition: SparseProduct.h:162
Definition: CoreEvaluators.h:65