aboutsummaryrefslogtreecommitdiff
path: root/doc/snippets/MatrixBase_reshaped_auto.cpp
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:03:33 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:03:33 +0000
commitd75c98c0a04a3e2951d164d5636f0aa190e10b7e (patch)
treefb979fb4cf4f8052c8cc66b1ec9516d91fcd859b /doc/snippets/MatrixBase_reshaped_auto.cpp
parent47df2af8abe17863900679f9f7c2175e311d3d7c (diff)
parentedb0ad5bb04b48aab7dd0978f0475edd3550de7c (diff)
downloadeigen-d75c98c0a04a3e2951d164d5636f0aa190e10b7e.tar.gz
Change-Id: Ie6c1e123fd584d11318b1666c272382ea62f0773
Diffstat (limited to 'doc/snippets/MatrixBase_reshaped_auto.cpp')
-rw-r--r--doc/snippets/MatrixBase_reshaped_auto.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_reshaped_auto.cpp b/doc/snippets/MatrixBase_reshaped_auto.cpp
new file mode 100644
index 000000000..59f9d3f60
--- /dev/null
+++ b/doc/snippets/MatrixBase_reshaped_auto.cpp
@@ -0,0 +1,4 @@
+Matrix4i m = Matrix4i::Random();
+cout << "Here is the matrix m:" << endl << m << endl;
+cout << "Here is m.reshaped(2, AutoSize):" << endl << m.reshaped(2, AutoSize) << endl;
+cout << "Here is m.reshaped<RowMajor>(AutoSize, fix<8>):" << endl << m.reshaped<RowMajor>(AutoSize, fix<8>) << endl;