Is it possible to mask an array in Eigen as in Matlab?
Something like
ArrayXd arrayA = ArrayXd::Random(10, 5); ArrayXi mask = ArrayXi::Zero(arrayA.rows
I found some reference here http://igl.ethz.ch/projects/libigl/matlab-to-eigen.html
For B = IM(A), they suggest:
B = A.unaryExpr(bind1st(mem_fun( static_cast (&VectorXi::operator())), &IM)).eval();
But it's not a generalized solution (and actually I couldn't try it )