mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add a tutorial page on the Map class, and add a section to FunctionsTakingEigenTypes about multiple-argument functions and the pitfalls when using Map/Expression types.
(transplanted from 44b19b432c
)
This commit is contained in:
7
doc/snippets/Tutorial_Map_rowmajor.cpp
Normal file
7
doc/snippets/Tutorial_Map_rowmajor.cpp
Normal file
@@ -0,0 +1,7 @@
|
||||
int array[8];
|
||||
for(int i = 0; i < 8; ++i) array[i] = i;
|
||||
cout << "Column-major:\n" << Map<Matrix<int,2,4> >(array) << endl;
|
||||
cout << "Row-major:\n" << Map<Matrix<int,2,4,RowMajor> >(array) << endl;
|
||||
cout << "Row-major using stride:\n" <<
|
||||
Map<Matrix<int,2,4>, Unaligned, Stride<1,4> >(array) << endl;
|
||||
|
||||
Reference in New Issue
Block a user