mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
doc: Explain type of result for VectorwiseOp member functions.
Prompted by a question on the forum.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user