diff options
author | Carlos Becker <carlosbecker@gmail.com> | 2010-07-08 18:16:39 +0100 |
---|---|---|
committer | Carlos Becker <carlosbecker@gmail.com> | 2010-07-08 18:16:39 +0100 |
commit | 951da96f146f3c6dc806a9e3d0fbbd96bbeb495b (patch) | |
tree | bf11f91e8ad4549e09d4f410ed39bef0b107c184 /doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp | |
parent | cb3aad1d91082dcf5edc6e5fe0fe883bbe816ebc (diff) |
Added more redux types/examples in tutorial and fixed some display issues
Diffstat (limited to 'doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp')
-rw-r--r-- | doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp new file mode 100644 index 000000000..10916877f --- /dev/null +++ b/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp @@ -0,0 +1,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; +} |