MatrixBase_cwiseEqual.cpp
Go to the documentation of this file.
1 MatrixXi m(2,2);
2 m << 1, 0,
3  1, 1;
4 cout << "Comparing m with identity matrix:" << endl;
5 cout << m.cwiseEqual(MatrixXi::Identity(2,2)) << endl;
6 Index count = m.cwiseEqual(MatrixXi::Identity(2,2)).count();
7 cout << "Number of coefficients that are equal: " << count << endl;
m
MatrixXi m(2, 2)
Eigen::Index
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:74


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:03:06