diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-10-13 14:41:57 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-10-13 14:41:57 +0200 |
commit | 8c37b1b5b779f30b2697faa8f67a44457a80262f (patch) | |
tree | bc2e7bb85dc3548f2cdff60a4ec5002fd0fc7d83 | |
parent | 14430940729b043ae14576d388555fc048619a3c (diff) |
add missing PartialReduxExpr::coeff(index) function
-rw-r--r-- | Eigen/src/Array/VectorwiseOp.h | 8 |
1 files changed, 8 insertions, 0 deletions
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; |