namespace StormEigen { namespace internal { template struct evaluator > : evaluator_base > { typedef Circulant XprType; typedef typename nested_eval::type ArgTypeNested; typedef typename remove_all::type ArgTypeNestedCleaned; typedef typename XprType::CoeffReturnType CoeffReturnType; enum { CoeffReadCost = evaluator::CoeffReadCost, Flags = StormEigen::ColMajor }; evaluator(const XprType& xpr) : m_argImpl(xpr.m_arg), m_rows(xpr.rows()) { } CoeffReturnType coeff(Index row, Index col) const { Index index = row - col; if (index < 0) index += m_rows; return m_argImpl.coeff(index); } evaluator m_argImpl; const Index m_rows; }; } }