aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
blob: 10916877f4c09fcdc8d166ab25853735a93b0b7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <Eigen/Dense>
#include <iostream>

using namespace std;
using namespace Eigen;

int main()
{
  MatrixXf m(2,2), n(2,2);
  
  m << 0,2,
       3,4;

  n << 1,2,
       3,4;
  
  cout << "m.all()   = " << m.all() << endl;
  cout << "m.any()   = " << m.any() << endl;
  cout << "m.count() = " << m.count() << endl;
  cout << endl;
  cout << "n.all()   = " << n.all() << endl;
  cout << "n.any()   = " << n.any() << endl;
  cout << "n.count() = " << n.count() << endl;
}