blob: 469af642c94c3df60b055b497cf0b9c5ccba31d3 [file] [log] [blame]
Jitse Niesen2b5a0062010-07-23 20:32:33 +01001MatrixXi m(2,2);
2m << 1, 0,
3 1, 1;
4cout << "Comparing m with identity matrix:" << endl;
5cout << m.cwiseEqual(MatrixXi::Identity(2,2)) << endl;
Christoph Hertzberg5e794022018-07-24 21:59:15 +02006Index count = m.cwiseEqual(MatrixXi::Identity(2,2)).count();
Jitse Niesen2b5a0062010-07-23 20:32:33 +01007cout << "Number of coefficients that are equal: " << count << endl;