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,6 +41,8 @@ template<typename MatrixType>
struct ei_traits<Minor<MatrixType> >
{
typedef typename MatrixType::Scalar Scalar;
typedef typename ei_nested<MatrixType>::type MatrixTypeNested;
typedef typename ei_unref<MatrixTypeNested>::type _MatrixTypeNested;
enum {
RowsAtCompileTime = (MatrixType::RowsAtCompileTime != Dynamic) ?
MatrixType::RowsAtCompileTime - 1 : Dynamic,
@@ -50,8 +52,8 @@ struct ei_traits<Minor<MatrixType> >
MatrixType::MaxRowsAtCompileTime - 1 : Dynamic,
MaxColsAtCompileTime = (MatrixType::MaxColsAtCompileTime != Dynamic) ?
MatrixType::MaxColsAtCompileTime - 1 : Dynamic,
Flags = MatrixType::Flags & DefaultLostFlagMask,
CoeffReadCost = MatrixType::CoeffReadCost
Flags = _MatrixTypeNested::Flags & DefaultLostFlagMask,
CoeffReadCost = _MatrixTypeNested::CoeffReadCost
};
};