summaryrefslogtreecommitdiffhomepage
path: root/eigen/doc/snippets/PartialRedux_count.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-03-25 14:17:07 +0100
committerStanislaw Halik <sthalik@misaki.pl>2017-03-25 14:17:07 +0100
commit35f7829af10c61e33dd2e2a7a015058e11a11ea0 (patch)
tree7135010dcf8fd0a49f3020d52112709bcb883bd6 /eigen/doc/snippets/PartialRedux_count.cpp
parent6e8724193e40a932faf9064b664b529e7301c578 (diff)
update
Diffstat (limited to 'eigen/doc/snippets/PartialRedux_count.cpp')
-rw-r--r--eigen/doc/snippets/PartialRedux_count.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/eigen/doc/snippets/PartialRedux_count.cpp b/eigen/doc/snippets/PartialRedux_count.cpp
index c7b3097..1c3b3a2 100644
--- a/eigen/doc/snippets/PartialRedux_count.cpp
+++ b/eigen/doc/snippets/PartialRedux_count.cpp
@@ -1,3 +1,5 @@
Matrix3d m = Matrix3d::Random();
cout << "Here is the matrix m:" << endl << m << endl;
-cout << "Here is the count of elements larger or equal than 0.5 of each row:" << endl << (m.array() >= 0.5).rowwise().count() << endl;
+Matrix<ptrdiff_t, 3, 1> res = (m.array() >= 0.5).rowwise().count();
+cout << "Here is the count of elements larger or equal than 0.5 of each row:" << endl;
+cout << res << endl;