mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-20 08:39:37 +08:00

- {1,2,3,4,5,...} for fixed-size vectors only - {{1,2,3},{4,5,6}} for the general cases - {{1,2,3,4,5,....}} is allowed for both row and column-vector
6 lines
126 B
C++
6 lines
126 B
C++
Array<int, 2, 3> a {
|
|
{1, 2, 3},
|
|
{3, 4, 5}
|
|
};
|
|
Array<int, Dynamic, 1> v {{1, 2, 3, 4, 5}};
|
|
cout << a << "\n\n" << v << endl; |