diff options
Diffstat (limited to 'doc/snippets')
-rw-r--r-- | doc/snippets/MatrixBase_reshaped_all.cpp | 5 | ||||
-rw-r--r-- | doc/snippets/MatrixBase_reshaped_auto.cpp | 4 | ||||
-rw-r--r-- | doc/snippets/MatrixBase_reshaped_fixed.cpp | 3 | ||||
-rw-r--r-- | doc/snippets/MatrixBase_reshaped_int_int.cpp | 3 |
4 files changed, 15 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_reshaped_all.cpp b/doc/snippets/MatrixBase_reshaped_all.cpp new file mode 100644 index 000000000..501f6276f --- /dev/null +++ b/doc/snippets/MatrixBase_reshaped_all.cpp @@ -0,0 +1,5 @@ +using Eigen::placeholders::all; +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m(all).transpose():" << endl << m(all).transpose() << endl; +cout << "Here is m.reshaped(fix<1>,AutoSize):" << endl << m.reshaped(fix<1>,AutoSize) << endl; diff --git a/doc/snippets/MatrixBase_reshaped_auto.cpp b/doc/snippets/MatrixBase_reshaped_auto.cpp new file mode 100644 index 000000000..8f02ae893 --- /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.reshape(2, AutoSize):" << endl << m.reshaped(2, AutoSize) << endl; +cout << "Here is m.reshape(AutoSize, fix<8>, RowOrder):" << endl << m.reshaped(AutoSize, fix<8>, RowOrder) << endl; diff --git a/doc/snippets/MatrixBase_reshaped_fixed.cpp b/doc/snippets/MatrixBase_reshaped_fixed.cpp new file mode 100644 index 000000000..a268ee5ae --- /dev/null +++ b/doc/snippets/MatrixBase_reshaped_fixed.cpp @@ -0,0 +1,3 @@ +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.reshape(fix<2>,fix<8>):" << endl << m.reshaped(fix<2>,fix<8>) << endl; diff --git a/doc/snippets/MatrixBase_reshaped_int_int.cpp b/doc/snippets/MatrixBase_reshaped_int_int.cpp new file mode 100644 index 000000000..4486d8347 --- /dev/null +++ b/doc/snippets/MatrixBase_reshaped_int_int.cpp @@ -0,0 +1,3 @@ +Matrix4i m = Matrix4i::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is m.reshape(2, 8):" << endl << m.reshaped(2, 8) << endl; |