Files
eigen/doc/snippets/Tutorial_range_for_loop_2d.cpp

8 lines
229 B
C++

// 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";