Package ucar.ma2
Class SectionIterable
- java.lang.Object
-
- ucar.ma2.SectionIterable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
SectionIterable.SectionIterator
-
Constructor Summary
Constructors Constructor Description SectionIterable(List<RangeIterator> ranges, int[] fullShape)
SectionIterable(List<RangeIterator> ranges, List<Integer> fullShapeList)
SectionIterable(Section section, int[] fullShape)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
computeSize()
SectionIterable.SectionIterator
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[].RangeIterator
getRange(int i)
int
getRank()
int[]
getShape()
Iterator<Integer>
iterator()
SectionIterable
subSection(int start, int endExclusive)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
SectionIterable
public SectionIterable(List<RangeIterator> ranges, int[] fullShape)
-
SectionIterable
public SectionIterable(List<RangeIterator> ranges, List<Integer> fullShapeList)
-
SectionIterable
public SectionIterable(Section section, int[] fullShape)
-
-
Method Detail
-
getRank
public int getRank()
-
subSection
public SectionIterable subSection(int start, int endExclusive)
-
getRange
public RangeIterator getRange(int i)
-
getShape
public int[] getShape()
-
computeSize
public long computeSize()
-
getIterator
public SectionIterable.SectionIterator 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
-
-