Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp File Reference

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 4 of file Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp.

5 {
6  Eigen::ArrayXXf a(2,2);
7 
8  a << 1,2,
9  3,4;
10 
11  std::cout << "(a > 0).all() = " << (a > 0).all() << std::endl;
12  std::cout << "(a > 0).any() = " << (a > 0).any() << std::endl;
13  std::cout << "(a > 0).count() = " << (a > 0).count() << std::endl;
14  std::cout << std::endl;
15  std::cout << "(a > 2).all() = " << (a > 2).all() << std::endl;
16  std::cout << "(a > 2).any() = " << (a > 2).any() << std::endl;
17  std::cout << "(a > 2).count() = " << (a > 2).count() << std::endl;
18 }
General-purpose arrays with easy API for coefficient-wise operations.
Definition: Array.h:49
static const Eigen::internal::all_t all