Package ucar.ma2
Class SectionIterable
java.lang.Object
ucar.ma2.SectionIterable
A Section composed of List instead of List.
SectionIterable knows the fullShape of which it is a section.
The iteration is over the elements in the section, returning 1D index into the full shape.
- Since:
- 8/23/2015
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionSectionIterable(List<RangeIterator> ranges, int[] fullShape) SectionIterable(List<RangeIterator> ranges, List<Integer> fullShapeList) SectionIterable(Section section, int[] fullShape) -
Method Summary
Modifier and TypeMethodDescriptionlongIterate over a section, returning the index in an equivalent 1D array of shape[] So this is a section in a (possibly) larger array described by shape[].getRange(int i) intgetRank()int[]getShape()iterator()subSection(int start, int endExclusive) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SectionIterable
-
SectionIterable
-
SectionIterable
-
-
Method Details
-
getRank
public int getRank() -
subSection
-
getRange
-
getShape
public int[] getShape() -
computeSize
public long computeSize() -
iterator
-
getIterator
Iterate over a section, returning the index in an equivalent 1D array of shape[] So this is a section in a (possibly) larger array described by shape[]. The index is in the "source" array.- Returns:
- iterator over this section
-