fix #2, bug in Diagonal::MaxRowsAtCompileTime when Index==Dynamic

This commit is contained in:
Benoit Jacob 2009-05-17 16:00:56 +02:00
parent 6ea7cbdc87
commit 934d6b4749

View File

@ -55,8 +55,8 @@ struct ei_traits<Diagonal<MatrixType,Index> >
MatrixType::ColsAtCompileTime) - AbsIndex),
ColsAtCompileTime = 1,
MaxRowsAtCompileTime = int(MatrixType::MaxSizeAtCompileTime) == Dynamic ? Dynamic
: (EIGEN_ENUM_MIN(MatrixType::MaxRowsAtCompileTime,
MatrixType::MaxColsAtCompileTime) - AbsIndex),
: Index == Dynamic ? EIGEN_ENUM_MIN(MatrixType::MaxRowsAtCompileTime, MatrixType::MaxColsAtCompileTime)
: (EIGEN_ENUM_MIN(MatrixType::MaxRowsAtCompileTime, MatrixType::MaxColsAtCompileTime) - AbsIndex),
MaxColsAtCompileTime = 1,
Flags = (unsigned int)_MatrixTypeNested::Flags & (HereditaryBits | LinearAccessBit),
CoeffReadCost = _MatrixTypeNested::CoeffReadCost