mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add exemples for reshaping/slicing with Map.
This commit is contained in:
4
doc/snippets/Tutorial_SlicingVec.cpp
Normal file
4
doc/snippets/Tutorial_SlicingVec.cpp
Normal file
@@ -0,0 +1,4 @@
|
||||
RowVectorXf v = RowVectorXf::LinSpaced(20,0,19);
|
||||
cout << "Input:" << endl << v << endl;
|
||||
Map<RowVectorXf,0,InnerStride<2> > v2(v.data(), v.size()/2);
|
||||
cout << "Even:" << v2 << endl;
|
||||
Reference in New Issue
Block a user