* allows fixed size matrix with size==0 (via a specialization of

MatrixStorage returning a null pointer). For instance this is very
  useful to make Tridiagonalization compile for 1x1 matrices
* fix LLT and eigensolver for 1x1 matrix
This commit is contained in:
Gael Guennebaud
2009-03-23 14:44:44 +00:00
parent f4cf5e9b26
commit 70c0174bf9
5 changed files with 30 additions and 7 deletions

View File

@@ -68,8 +68,8 @@ struct ei_traits<Block<MatrixType, BlockRows, BlockCols, _PacketAccess, _DirectA
typedef typename MatrixType::Nested MatrixTypeNested;
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
enum{
RowsAtCompileTime = MatrixType::RowsAtCompileTime == 1 ? 1 : BlockRows,
ColsAtCompileTime = MatrixType::ColsAtCompileTime == 1 ? 1 : BlockCols,
RowsAtCompileTime = BlockRows,
ColsAtCompileTime = BlockCols,
MaxRowsAtCompileTime = RowsAtCompileTime == 1 ? 1
: (BlockRows==Dynamic ? MatrixType::MaxRowsAtCompileTime : BlockRows),
MaxColsAtCompileTime = ColsAtCompileTime == 1 ? 1