Package ucar.nc2.iosp
Class LayoutSegmented
java.lang.Object
ucar.nc2.iosp.LayoutSegmented
- All Implemented Interfaces:
Layout
LayoutSegmented has data stored in segments.
Assume that each segment size is a multiple of elemSize.
- Since:
- Dec 31, 2007
-
Nested Class Summary
Nested classes/interfaces inherited from interface ucar.nc2.iosp.Layout
Layout.Chunk -
Constructor Summary
ConstructorsConstructorDescriptionLayoutSegmented(long[] segPos, int[] segSize, int elemSize, int[] srcShape, Section wantSection) Constructor. -
Method Summary
-
Constructor Details
-
LayoutSegmented
public LayoutSegmented(long[] segPos, int[] segSize, int elemSize, int[] srcShape, Section wantSection) throws InvalidRangeException Constructor.- Parameters:
segPos- starting address of each segment.segSize- number of bytes in each segment. Assume multiple of elemSizeelemSize- size of an element in bytes.srcShape- shape of the entire data array.wantSection- the wanted section of data- Throws:
InvalidRangeException- if ranges are misformed
-
-
Method Details
-
getTotalNelems
public long getTotalNelems()Description copied from interface:LayoutGet total number of elements in the wanted subset.- Specified by:
getTotalNelemsin interfaceLayout- Returns:
- total number of elements in the wanted subset.
-
getElemSize
public int getElemSize()Description copied from interface:LayoutGet size of each element in bytes.- Specified by:
getElemSizein interfaceLayout- Returns:
- size of each element in bytes.
-
hasNext
public boolean hasNext()Description copied from interface:LayoutIs there more to do -
next
Description copied from interface:LayoutGet the next chunk -
nextOuter
-