source: pacpussensors/trunk/Vislab/lib3dv/eigen/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp@ 136

Last change on this file since 136 was 136, checked in by ldecherf, 7 years ago

Doc

File size: 513 bytes
Line 
1#include <Eigen/Dense>
2#include <iostream>
3
4using namespace std;
5using namespace Eigen;
6
7int main()
8{
9 ArrayXXf a(2,2);
10
11 a << 1,2,
12 3,4;
13
14 cout << "(a > 0).all() = " << (a > 0).all() << endl;
15 cout << "(a > 0).any() = " << (a > 0).any() << endl;
16 cout << "(a > 0).count() = " << (a > 0).count() << endl;
17 cout << endl;
18 cout << "(a > 2).all() = " << (a > 2).all() << endl;
19 cout << "(a > 2).any() = " << (a > 2).any() << endl;
20 cout << "(a > 2).count() = " << (a > 2).count() << endl;
21}
Note: See TracBrowser for help on using the repository browser.