2010-07-09 01:16:39 +08:00
|
|
|
#include <Eigen/Dense>
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
using namespace Eigen;
|
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2010-07-24 02:20:10 +08:00
|
|
|
ArrayXXf a(2,2);
|
2010-07-09 01:16:39 +08:00
|
|
|
|
2010-07-24 02:20:10 +08:00
|
|
|
a << 1,2,
|
2010-07-09 01:16:39 +08:00
|
|
|
3,4;
|
|
|
|
|
2010-07-24 02:20:10 +08:00
|
|
|
cout << "(a > 0).all() = " << (a > 0).all() << endl;
|
|
|
|
cout << "(a > 0).any() = " << (a > 0).any() << endl;
|
|
|
|
cout << "(a > 0).count() = " << (a > 0).count() << endl;
|
2010-07-09 01:16:39 +08:00
|
|
|
cout << endl;
|
2010-07-24 02:20:10 +08:00
|
|
|
cout << "(a > 2).all() = " << (a > 2).all() << endl;
|
|
|
|
cout << "(a > 2).any() = " << (a > 2).any() << endl;
|
|
|
|
cout << "(a > 2).count() = " << (a > 2).count() << endl;
|
2010-07-09 01:16:39 +08:00
|
|
|
}
|