Change the logic of A.reshaped<Order>() to be a simple alias to A.reshaped<Order>(AutoSize,fix<1>).

This means that now AutoOrder is allowed, and it always return a column-vector.
This commit is contained in:
Gael Guennebaud
2018-10-03 11:41:47 +02:00
parent 0481900e25
commit 5f26f57598
4 changed files with 19 additions and 27 deletions

View File

@@ -157,8 +157,9 @@ void reshape4x4(MatType m)
VERIFY_IS_EQUAL(m.reshaped().reshaped(8,2), m.reshaped(8,2));
VERIFY_IS_EQUAL(m.reshaped(), m.template reshaped<ColMajor>());
VERIFY_IS_EQUAL(m.transpose().reshaped().transpose(), m.template reshaped<RowMajor>());
VERIFY_IS_EQUAL(m.template reshaped<RowMajor>(fix<1>, AutoSize), m.template reshaped<RowMajor>());
VERIFY_IS_EQUAL(m.transpose().reshaped(), m.template reshaped<RowMajor>());
VERIFY_IS_EQUAL(m.template reshaped<RowMajor>(AutoSize,fix<1>), m.template reshaped<RowMajor>());
VERIFY_IS_EQUAL(m.template reshaped<AutoOrder>(AutoSize,fix<1>), m.template reshaped<AutoOrder>());
VERIFY(is_same_eq(m.reshaped(AutoSize,fix<1>), m.reshaped()));
VERIFY_IS_EQUAL(m.template reshaped<RowMajor>(fix<1>,AutoSize), m.transpose().reshaped().transpose());