* allow matrix dimensions to be 0 (also at compile time) and provide a specialization

of ei_matrix_array for size 0
* adapt many xprs to have the right storage order, now that it matters
* add static assert on expressions to check that vector xprs
  have the righ storage order
* adapt ei_plain_matrix_type_(column|row)_major
* implement assignment of selfadjointview to matrix
  (was before failing to compile) and add nestedExpression() methods
* expand product_symm test
* in ei_gemv_selector, use the PlainObject type instead of a custom Matrix<...> type
* fix VectorBlock and Block mistakes
This commit is contained in:
Benoit Jacob
2010-03-21 11:28:03 -04:00
parent 547269da35
commit 92da574ec2
19 changed files with 117 additions and 59 deletions

View File

@@ -58,34 +58,21 @@
template<typename VectorType, int Size>
struct ei_traits<VectorBlock<VectorType, Size> >
: public ei_traits<Block<VectorType,
ei_traits<VectorType>::RowsAtCompileTime==1 ? 1 : Size,
ei_traits<VectorType>::ColsAtCompileTime==1
// handle the 1x1 case. Taking a dynamic-sized vectorblock in a 1x1 xpr.
// example: when doing HouseholderQR<Matrix<float,1,1> >.
&& ei_traits<VectorType>::RowsAtCompileTime!=1
? 1 : Size> >
ei_traits<VectorType>::Flags & RowMajorBit ? 1 : Size,
ei_traits<VectorType>::Flags & RowMajorBit ? Size : 1> >
{
};
template<typename VectorType, int Size> class VectorBlock
: public Block<VectorType,
ei_traits<VectorType>::RowsAtCompileTime==1 ? 1 : Size,
ei_traits<VectorType>::ColsAtCompileTime==1
// handle the 1x1 case. Taking a dynamic-sized vectorblock in a 1x1 xpr.
// example: when doing HouseholderQR<Matrix<float,1,1> >.
&& ei_traits<VectorType>::RowsAtCompileTime!=1
? 1 : Size>
ei_traits<VectorType>::Flags & RowMajorBit ? 1 : Size,
ei_traits<VectorType>::Flags & RowMajorBit ? Size : 1>
{
typedef Block<VectorType,
ei_traits<VectorType>::RowsAtCompileTime==1 ? 1 : Size,
ei_traits<VectorType>::ColsAtCompileTime==1
// handle the 1x1 case. Taking a dynamic-sized vectorblock in a 1x1 xpr.
// example: when doing HouseholderQR<Matrix<float,1,1> >.
&& ei_traits<VectorType>::RowsAtCompileTime!=1
? 1 : Size
> Base;
ei_traits<VectorType>::Flags & RowMajorBit ? 1 : Size,
ei_traits<VectorType>::Flags & RowMajorBit ? Size : 1> Base;
enum {
IsColVector = ei_traits<VectorType>::ColsAtCompileTime==1 && ei_traits<VectorType>::RowsAtCompileTime!=1
IsColVector = !(ei_traits<VectorType>::Flags & RowMajorBit)
};
public:
EIGEN_DENSE_PUBLIC_INTERFACE(VectorBlock)