diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-11-09 11:35:27 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-11-09 11:35:27 +0100 |
commit | d7c644213cbf548f67aeb7ed6f872aef96c1dbd2 (patch) | |
tree | 576a7e2400362015c89b7433571198fecc8ed579 /doc/snippets/Slicing_stdvector_cxx11.cpp | |
parent | a368848473967548572b69a841b70f9f123b9559 (diff) |
Add and update manual pages for slicing, indexing, and reshaping.
Diffstat (limited to 'doc/snippets/Slicing_stdvector_cxx11.cpp')
-rw-r--r-- | doc/snippets/Slicing_stdvector_cxx11.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/snippets/Slicing_stdvector_cxx11.cpp b/doc/snippets/Slicing_stdvector_cxx11.cpp new file mode 100644 index 000000000..469651e38 --- /dev/null +++ b/doc/snippets/Slicing_stdvector_cxx11.cpp @@ -0,0 +1,4 @@ +std::vector<int> ind{4,2,5,5,3}; +MatrixXi A = MatrixXi::Random(4,6); +cout << "Initial matrix A:\n" << A << "\n\n"; +cout << "A(all,ind):\n" << A(all,ind) << "\n\n";
\ No newline at end of file |