Removing zero columns or rows using eigen
问题 I was wondering if there is a more efficient way to remove columns or rows that are all zero elements. I am sure there is using the functions in the eigen library but I do not know how. Right now I am doing it like so, with the idea of the while loop being used in case there are multiple rows/columns that sum to zero I dont want to exceed range limits or pass any zero rows. void removeZeroRows() { int16_t index = 0; int16_t num_rows = rows(); while (index < num_rows) { double sum = row(index)