Tutorial_std_sort_rows_cxx11.cpp
Go to the documentation of this file.
1 ArrayXXi A = ArrayXXi::Random(4,4).abs();
2 cout << "Here is the initial matrix A:\n" << A << "\n";
3 for(auto row : A.rowwise())
4  std::sort(row.begin(), row.end());
5 cout << "Here is the sorted matrix A:\n" << A << "\n";
RowXpr row(Index i)
This is the const version of row(). *‍/.
Array< int, Dynamic, Dynamic > ArrayXXi
Definition: Array.h:344