COSC-4P80-Assignment-2/lib/eigen-3.4.0/doc/snippets/Slicing_rawarray_cxx11.cpp

6 lines
190 B
C++

#if EIGEN_HAS_STATIC_ARRAY_TEMPLATE
MatrixXi A = MatrixXi::Random(4,6);
cout << "Initial matrix A:\n" << A << "\n\n";
cout << "A(all,{4,2,5,5,3}):\n" << A(all,{4,2,5,5,3}) << "\n\n";
#endif