ReshapeOrder for reshape() methods
Last PIVector features ported to PIDeque
This commit is contained in:
10
main.cpp
10
main.cpp
@@ -10,13 +10,17 @@ template <typename S, typename T, typename std::enable_if<
|
||||
|
||||
|
||||
int main() {
|
||||
PIVector<int> x;
|
||||
PIDeque<int> x;
|
||||
x.resize(16, [](size_t i) {return i+1;});
|
||||
piCout << x;
|
||||
PIVector<PIVector<int>> m = x.reshape(4,4);
|
||||
PIDeque<PIDeque<int>> m = x.reshape(2,8);
|
||||
piCout << m;
|
||||
PIVector<int> y;
|
||||
piCout << x.reshape(4,4,PIDeque<int>::byColumn);
|
||||
piCout << x.reshape(2,8);
|
||||
piCout << x.reshape(2,8,PIDeque<int>::byColumn);
|
||||
PIDeque<int> y;
|
||||
y = m.reshape<int>();
|
||||
piCout << y;
|
||||
piCout << m.reshape<int>(PIDeque<int>::byColumn);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user