mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
add partial count redux (adapted patch from Ricard Marxer)
This commit is contained in:
3
doc/snippets/PartialRedux_count.cpp
Normal file
3
doc/snippets/PartialRedux_count.cpp
Normal 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;
|
||||
Reference in New Issue
Block a user