Implement evaluator for sparse-selfadjoint products

This commit is contained in:
Gael Guennebaud
2014-07-22 09:32:40 +02:00
parent 9b729f93a1
commit 2a251ffab0
9 changed files with 352 additions and 145 deletions

View File

@@ -448,45 +448,6 @@ protected:
PlainObject m_result;
};
// template<typename Lhs, typename Rhs, bool Transpose, typename LhsIterator>
// class sparse_dense_outer_product_iterator : public LhsIterator
// {
// typedef typename SparseDenseOuterProduct::Index Index;
// public:
// template<typename XprEval>
// EIGEN_STRONG_INLINE InnerIterator(const XprEval& prod, Index outer)
// : LhsIterator(prod.lhs(), 0),
// m_outer(outer), m_empty(false), m_factor(get(prod.rhs(), outer, typename internal::traits<Rhs>::StorageKind() ))
// {}
//
// inline Index outer() const { return m_outer; }
// inline Index row() const { return Transpose ? m_outer : Base::index(); }
// inline Index col() const { return Transpose ? Base::index() : m_outer; }
//
// inline Scalar value() const { return Base::value() * m_factor; }
// inline operator bool() const { return Base::operator bool() && !m_empty; }
//
// protected:
// Scalar get(const _RhsNested &rhs, Index outer, Dense = Dense()) const
// {
// return rhs.coeff(outer);
// }
//
// Scalar get(const _RhsNested &rhs, Index outer, Sparse = Sparse())
// {
// typename Traits::_RhsNested::InnerIterator it(rhs, outer);
// if (it && it.index()==0 && it.value()!=Scalar(0))
// return it.value();
// m_empty = true;
// return Scalar(0);
// }
//
// Index m_outer;
// bool m_empty;
// Scalar m_factor;
// };
template<typename LhsT, typename RhsT, bool Transpose>
struct sparse_dense_outer_product_evaluator
{