COSC-4P80-Assignment-2/lib/eigen-3.4.0/doc/snippets/Tutorial_SlicingVec.cpp

5 lines
180 B
C++
Raw Normal View History

2024-10-21 16:42:03 -04:00
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;