doc: Explain type of result for VectorwiseOp member functions.

Prompted by a question on the forum.
This commit is contained in:
Jitse Niesen
2013-08-06 09:49:44 +01:00
parent 2f0faf117e
commit 616f9cc593
2 changed files with 13 additions and 2 deletions

View File

@@ -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;