Add exemples for reshaping/slicing with Map.

This commit is contained in:
Gael Guennebaud
2016-02-06 22:49:18 +01:00
parent 8e599bc098
commit 010afe1619
6 changed files with 99 additions and 0 deletions

View 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;