Files
eigen/doc/snippets/Slicing_stdvector_cxx11.cpp

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

5 lines
191 B
C++
Raw Permalink Normal View History

std::vector<int> 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):\n" << A(Eigen::placeholders::all, ind) << "\n\n";