From 4ba0ec5e0e82e970c4918ba13f5d2090f9a32f4a Mon Sep 17 00:00:00 2001 From: Hauke Heibel Date: Tue, 4 Jan 2011 15:35:50 +0100 Subject: [PATCH] Fixed #148 where a const-accessor for coefficients was missing in the MatrixWrapper. --- Eigen/src/Core/ArrayWrapper.h | 5 +++++ Eigen/src/Core/Block.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Eigen/src/Core/ArrayWrapper.h b/Eigen/src/Core/ArrayWrapper.h index d5b8c6804..f6b7f90a4 100644 --- a/Eigen/src/Core/ArrayWrapper.h +++ b/Eigen/src/Core/ArrayWrapper.h @@ -160,6 +160,11 @@ class MatrixWrapper : public MatrixBase > return m_expression.const_cast_derived().coeffRef(row, col); } + inline const Scalar& coeffRef(Index row, Index col) const + { + return m_expression.derived().coeffRef(row, col); + } + inline const CoeffReturnType coeff(Index index) const { return m_expression.coeff(index); diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 00d5d8b4e..de384b025 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -174,7 +174,7 @@ template