source: pacpussensors/trunk/Vislab/lib3dv/eigen/doc/snippets/TopicStorageOrders_example.cpp@ 136

Last change on this file since 136 was 136, checked in by ldecherf, 7 years ago

Doc

File size: 525 bytes
Line 
1Matrix<int, 3, 4, ColMajor> Acolmajor;
2Acolmajor << 8, 2, 2, 9,
3 9, 1, 4, 4,
4 3, 5, 4, 5;
5cout << "The matrix A:" << endl;
6cout << Acolmajor << endl << endl;
7
8cout << "In memory (column-major):" << endl;
9for (int i = 0; i < Acolmajor.size(); i++)
10 cout << *(Acolmajor.data() + i) << " ";
11cout << endl << endl;
12
13Matrix<int, 3, 4, RowMajor> Arowmajor = Acolmajor;
14cout << "In memory (row-major):" << endl;
15for (int i = 0; i < Arowmajor.size(); i++)
16 cout << *(Arowmajor.data() + i) << " ";
17cout << endl;
18
Note: See TracBrowser for help on using the repository browser.