simplify previous changeset: sub-expressions are nested by value

This commit is contained in:
Gael Guennebaud 2015-04-18 22:50:16 +02:00
parent 5a3c48e3c6
commit fc2d5b86ce

View File

@ -107,8 +107,7 @@ struct sparse_diagonal_product_evaluator<SparseXprType, DiagCoeffType, SDP_AsCwi
{ {
public: public:
InnerIterator(const sparse_diagonal_product_evaluator &xprEval, Index outer) InnerIterator(const sparse_diagonal_product_evaluator &xprEval, Index outer)
: m_innerVectorXpr(xprEval.m_sparseXprNested.innerVector(outer)), : m_cwiseXpr(xprEval.m_sparseXprNested.innerVector(outer).cwiseProduct(xprEval.m_diagCoeffNested)),
m_cwiseXpr(m_innerVectorXpr.cwiseProduct(xprEval.m_diagCoeffNested)),
m_cwiseEval(m_cwiseXpr), m_cwiseEval(m_cwiseXpr),
m_cwiseIter(m_cwiseEval, 0), m_cwiseIter(m_cwiseEval, 0),
m_outer(outer) m_outer(outer)
@ -125,7 +124,6 @@ struct sparse_diagonal_product_evaluator<SparseXprType, DiagCoeffType, SDP_AsCwi
inline operator bool() const { return m_cwiseIter; } inline operator bool() const { return m_cwiseIter; }
protected: protected:
const typename SparseXprType::ConstInnerVectorReturnType m_innerVectorXpr;
const CwiseProductType m_cwiseXpr; const CwiseProductType m_cwiseXpr;
CwiseProductEval m_cwiseEval; CwiseProductEval m_cwiseEval;
CwiseProductIterator m_cwiseIter; CwiseProductIterator m_cwiseIter;