diff options
Diffstat (limited to 'eigen/doc/snippets/Tutorial_SlicingVec.cpp')
-rw-r--r-- | eigen/doc/snippets/Tutorial_SlicingVec.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/eigen/doc/snippets/Tutorial_SlicingVec.cpp b/eigen/doc/snippets/Tutorial_SlicingVec.cpp new file mode 100644 index 0000000..07e10bf --- /dev/null +++ b/eigen/doc/snippets/Tutorial_SlicingVec.cpp @@ -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;
\ No newline at end of file |