diff options
Diffstat (limited to 'doc/snippets')
-rw-r--r-- | doc/snippets/MatrixBase_prod.cpp | 3 | ||||
-rw-r--r-- | doc/snippets/PartialRedux_prod.cpp | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/doc/snippets/MatrixBase_prod.cpp b/doc/snippets/MatrixBase_prod.cpp new file mode 100644 index 000000000..d2f27bdc3 --- /dev/null +++ b/doc/snippets/MatrixBase_prod.cpp @@ -0,0 +1,3 @@ +Matrix3d m = Matrix3d::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is the product of all the coefficients:" << endl << m.prod() << endl; diff --git a/doc/snippets/PartialRedux_prod.cpp b/doc/snippets/PartialRedux_prod.cpp new file mode 100644 index 000000000..aacf09cbb --- /dev/null +++ b/doc/snippets/PartialRedux_prod.cpp @@ -0,0 +1,3 @@ +Matrix3d m = Matrix3d::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is the product of each row:" << endl << m.rowwise().prod() << endl; |