compile_TopicStorageOrders_example.cpp
Go to the documentation of this file.
00001 #include <Eigen/Core>
00002 #include <Eigen/LU>
00003 #include <Eigen/QR>
00004 #include <Eigen/Cholesky>
00005 #include <Eigen/Geometry>
00006 #include <Eigen/Jacobi>
00007 #include <Eigen/Eigenvalues>
00008 #include <iostream>
00009 
00010 using namespace Eigen;
00011 using namespace std;
00012 
00013 int main(int, char**)
00014 {
00015   cout.precision(3);
00016   Matrix<int, 3, 4, ColMajor> Acolmajor;
00017 Acolmajor << 8, 2, 2, 9,
00018              9, 1, 4, 4,
00019              3, 5, 4, 5;
00020 cout << "The matrix A:" << endl;
00021 cout << Acolmajor << endl << endl; 
00022 
00023 cout << "In memory (column-major):" << endl;
00024 for (int i = 0; i < Acolmajor.size(); i++)
00025   cout << *(Acolmajor.data() + i) << "  ";
00026 cout << endl << endl;
00027 
00028 Matrix<int, 3, 4, RowMajor> Arowmajor = Acolmajor;
00029 cout << "In memory (row-major):" << endl;
00030 for (int i = 0; i < Arowmajor.size(); i++)
00031   cout << *(Arowmajor.data() + i) << "  ";
00032 cout << endl;
00033 
00034 
00035   return 0;
00036 }


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:30:58