gtsam
3rdparty
Eigen
doc
examples
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
}
Eigen
Namespace containing all symbols from the Eigen library.
Definition:
jet.h:637
Eigen::all
static const Eigen::internal::all_t all
Definition:
IndexedViewHelper.h:171
a
ArrayXXi a
Definition:
Array_initializer_list_23_cxx11.cpp:1
std
Definition:
BFloat16.h:88
main
int main()
Definition:
Tutorial_ReductionsVisitorsBroadcasting_reductions_bool.cpp:7
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:09:36