fix flag and cost computations for nested expressions

This commit is contained in:
Gael Guennebaud
2008-05-01 18:58:30 +00:00
parent 5588def0cf
commit ef5b20bc50
7 changed files with 43 additions and 19 deletions

View File

@@ -41,13 +41,15 @@ template<typename MatrixType>
struct ei_traits<Transpose<MatrixType> >
{
typedef typename MatrixType::Scalar Scalar;
typedef typename ei_nested<MatrixType>::type MatrixTypeNested;
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
enum {
RowsAtCompileTime = MatrixType::ColsAtCompileTime,
ColsAtCompileTime = MatrixType::RowsAtCompileTime,
MaxRowsAtCompileTime = MatrixType::MaxColsAtCompileTime,
MaxColsAtCompileTime = MatrixType::MaxRowsAtCompileTime,
Flags = MatrixType::Flags ^ RowMajorBit,
CoeffReadCost = MatrixType::CoeffReadCost
Flags = _MatrixTypeNested::Flags ^ RowMajorBit,
CoeffReadCost = _MatrixTypeNested::CoeffReadCost
};
};