cleanup in Eval; instead introduce convenient typedefs in Matrix

for naming special related matrix types: RowType, ColumnType,
BlockType
This commit is contained in:
Benoit Jacob
2008-01-14 11:25:09 +00:00
parent 183bf54d27
commit e20aceb6eb
2 changed files with 22 additions and 7 deletions

View File

@@ -149,6 +149,19 @@ class Matrix : public MatrixBase<_Scalar, Matrix<_Scalar, _Rows, _Cols,
}
public:
typedef Matrix<
Scalar,
RowsAtCompileTime == 1 ? 1 : Dynamic,
ColsAtCompileTime == 1 ? 1 : Dynamic,
StorageOrder,
RowsAtCompileTime == 1 ? 1 : MaxRowsAtCompileTime,
ColsAtCompileTime == 1 ? 1 : MaxColsAtCompileTime
> BlockType;
typedef Matrix<Scalar, RowsAtCompileTime, 1,
StorageOrder, MaxRowsAtCompileTime, 1> ColumnType;
typedef Matrix<Scalar, 1, ColsAtCompileTime,
StorageOrder, 1, MaxColsAtCompileTime> RowType;
/** \returns a const pointer to the data array of this matrix */
const Scalar *data() const
{ return m_array.data(); }