diff options
author | Gael Guennebaud <g.gael@free.fr> | 2018-09-25 16:35:44 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2018-09-25 16:35:44 +0200 |
commit | 41c3a2ffc105812e81f8bef81e09e7099d36f9bd (patch) | |
tree | 001532eca7253333c00978522c60618b39a6fd1a /doc/snippets/MatrixBase_reshaped_to_vector.cpp | |
parent | 84a1101b3622ed5ca99010094ad64a419a25b553 (diff) |
Fix documentation of reshape to vectors.
Diffstat (limited to 'doc/snippets/MatrixBase_reshaped_to_vector.cpp')
-rw-r--r-- | doc/snippets/MatrixBase_reshaped_to_vector.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_reshaped_to_vector.cpp b/doc/snippets/MatrixBase_reshaped_to_vector.cpp new file mode 100644 index 000000000..ee844c203 --- /dev/null +++ b/doc/snippets/MatrixBase_reshaped_to_vector.cpp @@ -0,0 +1,4 @@ +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.reshaped().transpose():" << endl << m.reshaped().transpose() << endl; +cout << "Here is m.reshaped<RowMajor>(): " << endl << m.reshaped<RowMajor>() << endl; |