eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp
2010-06-28 00:05:11 +02:00

4 lines
155 B
C++

Matrix2i a; a << 1, 2, 3, 4;
cout << "Here is the matrix a:\n" << a << endl;
a = a.transpose(); // fails
cout << "and the aliasing effect:\n" << a << endl;