source:
pacpussensors/trunk/Vislab/lib3dv/eigen/doc/snippets/MatrixBase_cwiseEqual.cpp@
138
Last change on this file since 138 was 136, checked in by , 8 years ago | |
---|---|
File size: 274 bytes |
Line | |
---|---|
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 | int count = m.cwiseEqual(MatrixXi::Identity(2,2)).count(); |
7 | cout << "Number of coefficients that are equal: " << count << endl; |
Note:
See TracBrowser
for help on using the repository browser.