diff options
Diffstat (limited to 'eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp')
-rw-r--r-- | eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp b/eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp new file mode 100644 index 0000000..c8e4746 --- /dev/null +++ b/eigen/doc/snippets/tut_arithmetic_transpose_aliasing.cpp @@ -0,0 +1,5 @@ +Matrix2i a; a << 1, 2, 3, 4; +cout << "Here is the matrix a:\n" << a << endl; + +a = a.transpose(); // !!! do NOT do this !!! +cout << "and the result of the aliasing effect:\n" << a << endl;
\ No newline at end of file |