I have an Eigen::Matrix<bool,Dynamic,Dynamic> H (p,b) as result of the equivalent matlab operation H = (K*W)>0; (see this question for more details).
However, I have to compute the hamming distance between each row of H and a vector v. Since it's easy and fast to compute it between two std::bitset a and b through (a^b).count() I was wondering if it's possible to implement H = (K*W)>0; where H is Eigen::Array<std::bitset,Dynamic,1>.
As alternative, reading this question I have the feeling that I can use redux() for Eigen::Matrix<bool,Dynamic,Dynamic> H (p,b) but I cannot figure out how to define the reduction function