TopicStorageOrders_example.cpp
Go to the documentation of this file.
00001 Matrix<int, 3, 4, ColMajor> Acolmajor;
00002 Acolmajor << 8, 2, 2, 9,
00003              9, 1, 4, 4,
00004              3, 5, 4, 5;
00005 cout << "The matrix A:" << endl;
00006 cout << Acolmajor << endl << endl; 
00007 
00008 cout << "In memory (column-major):" << endl;
00009 for (int i = 0; i < Acolmajor.size(); i++)
00010   cout << *(Acolmajor.data() + i) << "  ";
00011 cout << endl << endl;
00012 
00013 Matrix<int, 3, 4, RowMajor> Arowmajor = Acolmajor;
00014 cout << "In memory (row-major):" << endl;
00015 for (int i = 0; i < Arowmajor.size(); i++)
00016   cout << *(Arowmajor.data() + i) << "  ";
00017 cout << endl;
00018 


libicr
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:33:44