eigen 3.3 SparseMatrix<bool> operations
问题 I would like to perform operations using Eigen::SparseMatrix<bool> without having to loop the matrices myself. This used to be possible in Eigen 3.2 but that code no longer compiles in version 3.3. For instance, the following code worked fine in 3.2: Eigen::SparseMatrix<bool> a(3,3), b(3,3), c(3,3); a = b + c; Is there an easy/short way of doing "and" and "or" operations in Eigen 3.3 without writing loops? 回答1: To be consistent with c++ standard behavior, adding boolean matrices now returns