eigen/doc/snippets/Tutorial_std_sort.cpp
2018-11-12 22:06:33 +01:00

4 lines
202 B
C++

Array4i v = Array4i::Random().abs();
cout << "Here is the initial vector v:\n" << v.transpose() << "\n";
std::sort(v.begin(), v.end());
cout << "Here is the sorted vector v:\n" << v.transpose() << "\n";