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

@@ -42,13 +42,15 @@ template<typename CoeffsVectorType>
struct ei_traits<DiagonalMatrix<CoeffsVectorType> >
{
typedef typename CoeffsVectorType::Scalar Scalar;
typedef typename ei_nested<CoeffsVectorType>::type CoeffsVectorTypeTypeNested;
typedef typename ei_unref<CoeffsVectorTypeTypeNested>::type _CoeffsVectorTypeTypeNested;
enum {
RowsAtCompileTime = CoeffsVectorType::SizeAtCompileTime,
ColsAtCompileTime = CoeffsVectorType::SizeAtCompileTime,
MaxRowsAtCompileTime = CoeffsVectorType::MaxSizeAtCompileTime,
MaxColsAtCompileTime = CoeffsVectorType::MaxSizeAtCompileTime,
Flags = CoeffsVectorType::Flags & DefaultLostFlagMask,
CoeffReadCost = CoeffsVectorType::CoeffReadCost
Flags = _CoeffsVectorTypeTypeNested::Flags & DefaultLostFlagMask,
CoeffReadCost = _CoeffsVectorTypeTypeNested::CoeffReadCost
};
};