mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fixed #148 where a const-accessor for coefficients was missing in the MatrixWrapper.
This commit is contained in:
@@ -160,6 +160,11 @@ class MatrixWrapper : public MatrixBase<MatrixWrapper<ExpressionType> >
|
|||||||
return m_expression.const_cast_derived().coeffRef(row, col);
|
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
|
inline const CoeffReturnType coeff(Index index) const
|
||||||
{
|
{
|
||||||
return m_expression.coeff(index);
|
return m_expression.coeff(index);
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ template<typename XprType, int BlockRows, int BlockCols, bool InnerPanel, bool H
|
|||||||
|
|
||||||
inline const Scalar& coeffRef(Index row, Index col) const
|
inline const Scalar& coeffRef(Index row, Index col) const
|
||||||
{
|
{
|
||||||
return m_xpr.const_cast_derived()
|
return m_xpr.derived()
|
||||||
.coeffRef(row + m_startRow.value(), col + m_startCol.value());
|
.coeffRef(row + m_startRow.value(), col + m_startCol.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user