source: pacpussensors/trunk/Vislab/lib3dv-1.2.0/lib3dv/eigen/doc/snippets/MatrixBase_cwiseEqual.cpp

Last change on this file was 136, checked in by ldecherf, 8 years ago

Doc

File size: 274 bytes
Line 
1MatrixXi m(2,2);
2m << 1, 0,
3 1, 1;
4cout << "Comparing m with identity matrix:" << endl;
5cout << m.cwiseEqual(MatrixXi::Identity(2,2)) << endl;
6int count = m.cwiseEqual(MatrixXi::Identity(2,2)).count();
7cout << "Number of coefficients that are equal: " << count << endl;
Note: See TracBrowser for help on using the repository browser.