mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user