add partial count redux (adapted patch from Ricard Marxer)

This commit is contained in:
Gael Guennebaud
2009-01-24 15:22:44 +00:00
parent 81b0ab53cf
commit 56c7e164f0
4 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
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.cwise() >= 0.5).rowwise().count() << endl;