aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/snippets/MatrixBase_transpose.cpp
diff options
context:
space:
mode:
authorGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-12-27 21:43:10 +0000
committerGravatar Benoit Jacob <jacob.benoit.1@gmail.com>2007-12-27 21:43:10 +0000
commite7bdbe2e6a7d3d3e3f498e1ba9159b0ec1a8ccae (patch)
treeb4c3f1b04b6e00434a08bbe82cdf0a6181b271a5 /doc/snippets/MatrixBase_transpose.cpp
parent6b9370e0f0608f203337539c72fe4821d925a978 (diff)
matrix storage order can now also be row-dominant (choosable for each matrix separately)
map() moves from MatrixBase to Matrix much more documentation/examples/snippets
Diffstat (limited to 'doc/snippets/MatrixBase_transpose.cpp')
-rw-r--r--doc/snippets/MatrixBase_transpose.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_transpose.cpp b/doc/snippets/MatrixBase_transpose.cpp
new file mode 100644
index 000000000..0a0586d53
--- /dev/null
+++ b/doc/snippets/MatrixBase_transpose.cpp
@@ -0,0 +1,8 @@
+Matrix2f m = Matrix2f::random();
+cout << "Here is the matrix m:" << endl << m << endl;
+cout << "Here is the transpose of m:" << endl << m.transpose() << endl;
+cout << "Here is the coefficient (1,0) in the transpose of m:" << endl
+ << m.transpose()(1,0) << endl;
+cout << "Let us overwrite this coefficient with the value 0." << endl;
+m.transpose()(1,0) = 0;
+cout << "Now the matrix m is:" << endl << m << endl;