mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Clang-format tests, examples, libraries, benchmarks, etc.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
3252ecc7a4
commit
46e9cdb7fe
@@ -1,18 +1,13 @@
|
||||
Matrix<int, 3, 4, ColMajor> Acolmajor;
|
||||
Acolmajor << 8, 2, 2, 9,
|
||||
9, 1, 4, 4,
|
||||
3, 5, 4, 5;
|
||||
Acolmajor << 8, 2, 2, 9, 9, 1, 4, 4, 3, 5, 4, 5;
|
||||
cout << "The matrix A:" << endl;
|
||||
cout << Acolmajor << endl << endl;
|
||||
cout << Acolmajor << endl << endl;
|
||||
|
||||
cout << "In memory (column-major):" << endl;
|
||||
for (int i = 0; i < Acolmajor.size(); i++)
|
||||
cout << *(Acolmajor.data() + i) << " ";
|
||||
for (int i = 0; i < Acolmajor.size(); i++) cout << *(Acolmajor.data() + i) << " ";
|
||||
cout << endl << endl;
|
||||
|
||||
Matrix<int, 3, 4, RowMajor> Arowmajor = Acolmajor;
|
||||
cout << "In memory (row-major):" << endl;
|
||||
for (int i = 0; i < Arowmajor.size(); i++)
|
||||
cout << *(Arowmajor.data() + i) << " ";
|
||||
for (int i = 0; i < Arowmajor.size(); i++) cout << *(Arowmajor.data() + i) << " ";
|
||||
cout << endl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user