Sign in
◑
Theme
eigen
/
mirror
/
3b4bb6deb6b9e6bd67719d7d9036baf53b4e4b26
/
.
/
doc
/
snippets
/
Tutorial_range_for_loop_2d.cpp
blob: dc121f2287da801e4edce95a43437b18e5c29261 [
file
]
// SPDX-FileCopyrightText: The Eigen Authors
// SPDX-License-Identifier: MPL-2.0
Matrix2i
A
=
Matrix2i
::
Random
();
cout
<<
"Here are the coeffs of the 2x2 matrix A:\n"
;
for
(
auto
x
:
A
.
reshaped
())
cout
<<
x
<<
" "
;
cout
<<
"\n"
;