diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-07-21 11:19:52 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-07-21 11:19:52 +0200 |
commit | afa8f2ca952e52201b36813b848aa7a68fca70e9 (patch) | |
tree | 9360f6ca7eb9711d469040fa9c34219fe158ccd7 /Eigen/src/Core/Block.h | |
parent | 34490f1493f8111c131e471a3dc7f6fbe5687404 (diff) |
* various fixes related to sub diagonals and band matrix
* allows 0 sized objects in Block/Map
Diffstat (limited to 'Eigen/src/Core/Block.h')
-rw-r--r-- | Eigen/src/Core/Block.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Eigen/src/Core/Block.h b/Eigen/src/Core/Block.h index 382518696..ffe065e8b 100644 --- a/Eigen/src/Core/Block.h +++ b/Eigen/src/Core/Block.h @@ -124,7 +124,7 @@ template<typename MatrixType, int BlockRows, int BlockCols, int PacketAccess, in { EIGEN_STATIC_ASSERT(RowsAtCompileTime!=Dynamic && ColsAtCompileTime!=Dynamic,THIS_METHOD_IS_ONLY_FOR_FIXED_SIZE) ei_assert(startRow >= 0 && BlockRows >= 1 && startRow + BlockRows <= matrix.rows() - && startCol >= 0 && BlockCols >= 1 && startCol + BlockCols <= matrix.cols()); + && startCol >= 0 && BlockCols >= 1 && startCol + BlockCols <= matrix.cols()); } /** Dynamic-size constructor @@ -137,8 +137,8 @@ template<typename MatrixType, int BlockRows, int BlockCols, int PacketAccess, in { ei_assert((RowsAtCompileTime==Dynamic || RowsAtCompileTime==blockRows) && (ColsAtCompileTime==Dynamic || ColsAtCompileTime==blockCols)); - ei_assert(startRow >= 0 && blockRows >= 1 && startRow + blockRows <= matrix.rows() - && startCol >= 0 && blockCols >= 1 && startCol + blockCols <= matrix.cols()); + ei_assert(startRow >= 0 && blockRows >= 0 && startRow + blockRows <= matrix.rows() + && startCol >= 0 && blockCols >= 0 && startCol + blockCols <= matrix.cols()); } EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Block) @@ -265,8 +265,8 @@ class Block<MatrixType,BlockRows,BlockCols,PacketAccess,HasDirectAccess> { ei_assert((RowsAtCompileTime==Dynamic || RowsAtCompileTime==blockRows) && (ColsAtCompileTime==Dynamic || ColsAtCompileTime==blockCols)); - ei_assert(startRow >= 0 && blockRows >= 1 && startRow + blockRows <= matrix.rows() - && startCol >= 0 && blockCols >= 1 && startCol + blockCols <= matrix.cols()); + ei_assert(startRow >= 0 && blockRows >= 0 && startRow + blockRows <= matrix.rows() + && startCol >= 0 && blockCols >= 0 && startCol + blockCols <= matrix.cols()); } inline int stride(void) const { return m_matrix.stride(); } |