1
0
mirror of https://gitlab.com/libeigen/eigen.git synced 2025-05-05 10:14:05 +08:00
eigen/doc/snippets/Tutorial_SlicingVec.cpp

5 lines
186 B
C++

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;