/** * Create a new Section by compacting each Range. * first = first/stride, last=last/stride, stride=1. * * @return compacted Section * @throws InvalidRangeException elements must be nonnegative, 0 <= first <= last */ public Section compact() throws InvalidRangeException { List<Range> results = new ArrayList<Range>(getRank()); for (Range r : list) { results.add(r.compact()); } return new Section(results); }
/** * Create a new Section by compacting each Range. * first = first/stride, last=last/stride, stride=1. * * @return compacted Section * @throws InvalidRangeException elements must be nonnegative, 0 <= first <= last */ public Section compact() throws InvalidRangeException { List<Range> results = new ArrayList<>(getRank()); for (Range r : list) { results.add(r.compact()); } return new Section(results); }
/** * Create a new Section by compacting each Range. * first = first/stride, last=last/stride, stride=1. * * @return compacted Section * @throws InvalidRangeException elements must be nonnegative, 0 <= first <= last */ public Section compact() throws InvalidRangeException { List<Range> results = new ArrayList<>(getRank()); for (Range r : list) { results.add(r.compact()); } return new Section(results); }