ucar.nc2.iosp
Class RegularIndexer

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

Deprecated. use LayoutRegular

public class RegularIndexer
extends Indexer

Indexer into a regular array. This calculates byte lengths and offsets of the wanted data into the entire data. Assumes that the data is stored "regularly", like netcdf arrays and hdf5 continuous storage. Also handles netcdf3 record dimensions.

Author:
caron

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.nc2.iosp.Indexer
Indexer.Chunk
 
Constructor Summary
RegularIndexer(int[] varShape, int elemSize, long startPos, java.util.List section, int recSize)
          Deprecated. Constructor.
 
Method Summary
 int getChunkSize()
          Deprecated.  
 int getElemSize()
          Deprecated.  
 long getTotalNelems()
          Deprecated.  
 int[] getWantShape()
          Deprecated.  
 boolean hasNext()
          Deprecated.  
 Indexer.Chunk next()
          Deprecated. Get the next chunk
 
Methods inherited from class ucar.nc2.iosp.Indexer
printa, printa
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegularIndexer

public RegularIndexer(int[] varShape,
                      int elemSize,
                      long startPos,
                      java.util.List section,
                      int recSize)
               throws InvalidRangeException
Deprecated. 
Constructor.

Parameters:
varShape - shape of the entire data array.
elemSize - size of on element in bytes.
startPos - starting address of the entire data array.
section - 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
Method Detail

getChunkSize

public int getChunkSize()
Deprecated. 

getWantShape

public int[] getWantShape()
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()