Files
eigen/doc/snippets/Slicing_arrayexpr.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

6 lines
198 B
C++
Raw Permalink Normal View History

ArrayXi ind(5);
ind << 4, 2, 5, 5, 3;
MatrixXi A = MatrixXi::Random(4, 6);
cout << "Initial matrix A:\n" << A << "\n\n";
2021-12-05 17:31:12 +00:00
cout << "A(all,ind-1):\n" << A(Eigen::placeholders::all, ind - 1) << "\n\n";