Line | |
---|
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 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.