1*bf2c3715SXin Li MatrixXi m(2,2); 2*bf2c3715SXin Li m << 1, 0, 3*bf2c3715SXin Li 1, 1; 4*bf2c3715SXin Li cout << "Comparing m with identity matrix:" << endl; 5*bf2c3715SXin Li cout << m.cwiseNotEqual(MatrixXi::Identity(2,2)) << endl; 6*bf2c3715SXin Li Index count = m.cwiseNotEqual(MatrixXi::Identity(2,2)).count(); 7*bf2c3715SXin Li cout << "Number of coefficients that are not equal: " << count << endl; 8