Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp
Go to the documentation of this file.
1 #include <Eigen/Dense>
2 #include <iostream>
3 
4 using namespace std;
5 using namespace Eigen;
6 
7 int 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 }
static const Eigen::internal::all_t all
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Definition: BFloat16.h:88


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:38