From d7c644213cbf548f67aeb7ed6f872aef96c1dbd2 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Fri, 9 Nov 2018 11:35:27 +0100 Subject: Add and update manual pages for slicing, indexing, and reshaping. --- doc/snippets/Tutorial_reshaped_vs_resize_1.cpp | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/snippets/Tutorial_reshaped_vs_resize_1.cpp (limited to 'doc/snippets/Tutorial_reshaped_vs_resize_1.cpp') diff --git a/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp b/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp new file mode 100644 index 000000000..686b96c38 --- /dev/null +++ b/doc/snippets/Tutorial_reshaped_vs_resize_1.cpp @@ -0,0 +1,5 @@ +MatrixXi m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.reshaped(2, 8):" << endl << m.reshaped(2, 8) << endl; +m.resize(2,8); +cout << "Here is the matrix m after m.resize(2,8):" << endl << m << endl; \ No newline at end of file -- cgit v1.2.3