Line | |
---|
1 | #include <Eigen/Dense>
|
---|
2 | #include <iostream>
|
---|
3 |
|
---|
4 | using namespace Eigen;
|
---|
5 | using namespace std;
|
---|
6 |
|
---|
7 | int main(int, char**)
|
---|
8 | {
|
---|
9 | cout.precision(3);
|
---|
10 | int array[8];
|
---|
11 | for(int i = 0; i < 8; ++i) array[i] = i;
|
---|
12 | cout << "Column-major:\n" << Map<Matrix<int,2,4> >(array) << endl;
|
---|
13 | cout << "Row-major:\n" << Map<Matrix<int,2,4,RowMajor> >(array) << endl;
|
---|
14 | cout << "Row-major using stride:\n" <<
|
---|
15 | Map<Matrix<int,2,4>, Unaligned, Stride<1,4> >(array) << endl;
|
---|
16 |
|
---|
17 |
|
---|
18 | return 0;
|
---|
19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.