ucar.nc2.iosp
Class RegularLayout

java.lang.Object
  extended by ucar.nc2.iosp.Indexer
      extended by ucar.nc2.iosp.RegularLayout

Deprecated. use LayoutRegular

public class RegularLayout
extends Indexer

Indexer into data that has a "regular" layout, like netcdf-3 and hdf5 compact and contiguous storage. The data is contiguous, with outer dimension varying fastest. Given a Section, this calculates the set of contiguous "chunks" of the wanted data into the stored data. Also handles netcdf3 record dimensions. The wanted section is always a subset of the data section (see RegularSectionLayout where thats not the case).

Author:
caron

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.nc2.iosp.Indexer
Indexer.Chunk
 
Constructor Summary
RegularLayout(int[] varShape, int elemSize, long startPos, java.util.List<Range> ranges, int recSize)
          Deprecated. Constructor: drop in replacement for old RegularIndexer.
RegularLayout(long startPos, int elemSize, int recSize, int[] varShape, Section wantSection)
          Deprecated. Constructor.
 
Method Summary
static Indexer factory(long startPos, int elemSize, int recSize, int[] varShape, Section wantSection)
          Deprecated.  
 int getChunkSize()
          Deprecated.  
 int getElemSize()
          Deprecated.  
 long getTotalNelems()
          Deprecated.  
 boolean hasNext()
          Deprecated.  
 Indexer.Chunk next()
          Deprecated. Get the next chunk
 java.lang.String toString()
          Deprecated.  
 
Methods inherited from class ucar.nc2.iosp.Indexer
printa, printa
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RegularLayout

public RegularLayout(int[] varShape,
                     int elemSize,
                     long startPos,
                     java.util.List<Range> ranges,
                     int recSize)
              throws InvalidRangeException
Deprecated. 
Constructor: drop in replacement for old RegularIndexer.

Parameters:
varShape - shape of the entire data array.
elemSize - size of on element in bytes.
startPos - starting address of the entire data array.
ranges - the wanted section of data: List of Range objects, corresponding to each Dimension, else null means all.
recSize - if > 0, then size of outer stride in bytes, else ignored
Throws:
InvalidRangeException - is ranges are misformed

RegularLayout

public RegularLayout(long startPos,
                     int elemSize,
                     int recSize,
                     int[] varShape,
                     Section wantSection)
              throws InvalidRangeException
Deprecated. 
Constructor.

Parameters:
startPos - starting address of the entire data array.
elemSize - size of an element in bytes.
recSize - if > 0, then size of outer stride in bytes, else ignored
varShape - shape of the entire data array.
wantSection - the wanted section of data, contains a List of Range objects.
Throws:
InvalidRangeException - if ranges are misformed
Method Detail

factory

public static Indexer factory(long startPos,
                              int elemSize,
                              int recSize,
                              int[] varShape,
                              Section wantSection)
                       throws InvalidRangeException
Deprecated. 
Throws:
InvalidRangeException

getChunkSize

public int getChunkSize()
Deprecated. 

getTotalNelems

public long getTotalNelems()
Deprecated. 
Specified by:
getTotalNelems in class Indexer
Returns:
total number of elements in the wanted subset.

getElemSize

public int getElemSize()
Deprecated. 
Specified by:
getElemSize in class Indexer
Returns:
size of each element in bytes.

hasNext

public boolean hasNext()
Deprecated. 
Specified by:
hasNext in class Indexer
Returns:
true if theres more to do

next

public Indexer.Chunk next()
Deprecated. 
Description copied from class: Indexer
Get the next chunk

Specified by:
next in class Indexer
Returns:
next chunk, or null if !hasNext()

toString

public java.lang.String toString()
Deprecated. 
Overrides:
toString in class java.lang.Object