From 8c37b1b5b779f30b2697faa8f67a44457a80262f Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 13 Oct 2009 14:41:57 +0200 Subject: [PATCH] add missing PartialReduxExpr::coeff(index) function --- Eigen/src/Array/VectorwiseOp.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Eigen/src/Array/VectorwiseOp.h b/Eigen/src/Array/VectorwiseOp.h index fa0958987..27e23ce59 100644 --- a/Eigen/src/Array/VectorwiseOp.h +++ b/Eigen/src/Array/VectorwiseOp.h @@ -95,6 +95,14 @@ class PartialReduxExpr : ei_no_assignment_operator, return m_functor(m_matrix.row(i)); } + const Scalar coeff(int index) const + { + if (Direction==Vertical) + return m_functor(m_matrix.col(index)); + else + return m_functor(m_matrix.row(index)); + } + protected: const MatrixTypeNested m_matrix; const MemberOp m_functor;