From de1220aa62b8ec06dc608e86e023ce2b25658642 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 28 Jun 2010 00:05:11 +0200 Subject: add a Transposition section in page 2 --- doc/snippets/tut_arithmetic_transpose_aliasing.cpp | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/snippets/tut_arithmetic_transpose_aliasing.cpp (limited to 'doc/snippets/tut_arithmetic_transpose_aliasing.cpp') diff --git a/doc/snippets/tut_arithmetic_transpose_aliasing.cpp b/doc/snippets/tut_arithmetic_transpose_aliasing.cpp new file mode 100644 index 000000000..dec2634a2 --- /dev/null +++ b/doc/snippets/tut_arithmetic_transpose_aliasing.cpp @@ -0,0 +1,4 @@ +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; \ No newline at end of file -- cgit v1.2.3