Sign in
third-party-mirror
/
eigen
/
45874d87377474c35f39757c4299877efcc45bf7
/
.
/
doc
/
snippets
/
Tutorial_std_sort_rows_cxx11.cpp
blob: fdd850d13710fa12d299e5eb44ff091a4d9303e5 [
file
] [
log
] [
blame
]
ArrayXXi
A
=
ArrayXXi
::
Random
(
4
,
4
).
abs
();
cout
<<
"Here is the initial matrix A:\n"
<<
A
<<
"\n"
;
for
(
auto
row
:
A
.
rowwise
())
std
::
sort
(
row
.
begin
(),
row
.
end
());
cout
<<
"Here is the sorted matrix A:\n"
<<
A
<<
"\n"
;