diff options
author | 2008-03-30 18:43:22 +0000 | |
---|---|---|
committer | 2008-03-30 18:43:22 +0000 | |
commit | f279162ec4f01ecec8fa37eae02757720e16e65b (patch) | |
tree | 34938443dd2eb8a59b98f94ce1544d4c46587fcd /Eigen/src/Core/DiagonalMatrix.h | |
parent | 758b26551a01894f76c8376f11ac9fd3c13d0844 (diff) |
* introducte recursive Flags system for the expressions
-- currently 3 flags: RowMajor, Lazy and Large
-- only RowMajor actually used for now
* many minor improvements
Diffstat (limited to 'Eigen/src/Core/DiagonalMatrix.h')
-rw-r--r-- | Eigen/src/Core/DiagonalMatrix.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Eigen/src/Core/DiagonalMatrix.h b/Eigen/src/Core/DiagonalMatrix.h index 36d2c656b..f46e8ad0d 100644 --- a/Eigen/src/Core/DiagonalMatrix.h +++ b/Eigen/src/Core/DiagonalMatrix.h @@ -46,7 +46,8 @@ struct ei_traits<DiagonalMatrix<CoeffsVectorType> > RowsAtCompileTime = CoeffsVectorType::SizeAtCompileTime, ColsAtCompileTime = CoeffsVectorType::SizeAtCompileTime, MaxRowsAtCompileTime = CoeffsVectorType::MaxSizeAtCompileTime, - MaxColsAtCompileTime = CoeffsVectorType::MaxSizeAtCompileTime + MaxColsAtCompileTime = CoeffsVectorType::MaxSizeAtCompileTime, + Flags = CoeffsVectorType::Flags }; }; @@ -69,7 +70,7 @@ class DiagonalMatrix : ei_no_assignment_operator, int _rows() const { return m_coeffs.size(); } int _cols() const { return m_coeffs.size(); } - Scalar _coeff(int row, int col) const + const Scalar _coeff(int row, int col) const { return row == col ? m_coeffs.coeff(row) : static_cast<Scalar>(0); } |