ucar.nc2.iosp
Class LayoutRegularSegmented

java.lang.Object
  extended by ucar.nc2.iosp.LayoutRegularSegmented
All Implemented Interfaces:
Layout

public class LayoutRegularSegmented
extends Object
implements Layout

LayoutRegularSegmented has data stored in segments that are regularly spaced. This is now Netcdf-3 "record variables" are laid out.

Since:
Dec 31, 2007
Author:
caron

Nested Class Summary
 
Nested classes/interfaces inherited from interface ucar.nc2.iosp.Layout
Layout.Chunk
 
Constructor Summary
LayoutRegularSegmented(long startPos, int elemSize, long recSize, int[] srcShape, Section wantSection)
          Constructor.
 
Method Summary
 int getElemSize()
          Get size of each element in bytes.
 long getTotalNelems()
          Get total number of elements in the wanted subset.
 boolean hasNext()
          Is there more to do
 Layout.Chunk next()
          Get the next chunk
 IndexChunker.Chunk nextOuter()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LayoutRegularSegmented

public LayoutRegularSegmented(long startPos,
                              int elemSize,
                              long recSize,
                              int[] srcShape,
                              Section wantSection)
                       throws InvalidRangeException
Constructor.

Parameters:
startPos - starting address of the entire data array.
elemSize - size of an element in bytes.
recSize - size of outer stride in bytes
srcShape - shape of the entire data array. must have rank > 0
wantSection - the wanted section of data
Throws:
InvalidRangeException - if ranges are misformed
Method Detail

getTotalNelems

public long getTotalNelems()
Description copied from interface: Layout
Get total number of elements in the wanted subset.

Specified by:
getTotalNelems in interface Layout
Returns:
total number of elements in the wanted subset.

getElemSize

public int getElemSize()
Description copied from interface: Layout
Get size of each element in bytes.

Specified by:
getElemSize in interface Layout
Returns:
size of each element in bytes.

hasNext

public boolean hasNext()
Description copied from interface: Layout
Is there more to do

Specified by:
hasNext in interface Layout
Returns:
true if theres more to do

next

public Layout.Chunk next()
Description copied from interface: Layout
Get the next chunk

Specified by:
next in interface Layout
Returns:
next chunk, or null if !hasNext()

nextOuter

public IndexChunker.Chunk nextOuter()


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.