* 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

@@ -203,10 +203,13 @@ struct ei_eval<Array<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>, Dense
*/
template<typename T> struct ei_plain_matrix_type_column_major
{
enum { Rows = ei_traits<T>::RowsAtCompileTime,
Cols = ei_traits<T>::ColsAtCompileTime
};
typedef Matrix<typename ei_traits<T>::Scalar,
ei_traits<T>::RowsAtCompileTime,
ei_traits<T>::ColsAtCompileTime,
AutoAlign | ColMajor,
Rows,
Cols,
(Rows==1&&Cols!=1) ? RowMajor : ColMajor,
ei_traits<T>::MaxRowsAtCompileTime,
ei_traits<T>::MaxColsAtCompileTime
> type;
@@ -216,10 +219,13 @@ template<typename T> struct ei_plain_matrix_type_column_major
*/
template<typename T> struct ei_plain_matrix_type_row_major
{
enum { Rows = ei_traits<T>::RowsAtCompileTime,
Cols = ei_traits<T>::ColsAtCompileTime
};
typedef Matrix<typename ei_traits<T>::Scalar,
ei_traits<T>::RowsAtCompileTime,
ei_traits<T>::ColsAtCompileTime,
AutoAlign | RowMajor,
Rows,
Cols,
(Cols==1&&Rows!=1) ? ColMajor : RowMajor,
ei_traits<T>::MaxRowsAtCompileTime,
ei_traits<T>::MaxColsAtCompileTime
> type;