From 44861dcbfeee041223c4aac1ee075e92fa4daa01 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 18 Sep 2016 12:42:15 +0200 Subject: update --- eigen/doc/snippets/MatrixBase_rowwise.cpp | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 eigen/doc/snippets/MatrixBase_rowwise.cpp (limited to 'eigen/doc/snippets/MatrixBase_rowwise.cpp') diff --git a/eigen/doc/snippets/MatrixBase_rowwise.cpp b/eigen/doc/snippets/MatrixBase_rowwise.cpp new file mode 100644 index 0000000..ae93964 --- /dev/null +++ b/eigen/doc/snippets/MatrixBase_rowwise.cpp @@ -0,0 +1,5 @@ +Matrix3d m = Matrix3d::Random(); +cout << "Here is the matrix m:" << endl << m << endl; +cout << "Here is the sum of each row:" << endl << m.rowwise().sum() << endl; +cout << "Here is the maximum absolute value of each row:" + << endl << m.cwiseAbs().rowwise().maxCoeff() << endl; -- cgit v1.2.3