for (int i=0; i < slices; i++) {
if (condition.apply(viewSlice(i))) matches.add(i);
}
matches.trimToSize();
return viewSelection(matches.elements(), null, null); // take all rows and columns
}
/**
* Construct and returns a new selection view.
*
* @param sliceOffsets the offsets of the visible elements.