Package rasj

Class RasMArrayDouble

All Implemented Interfaces:
RasGlobalDefs

public class RasMArrayDouble extends RasGMArray

 PURPOSE:
  This class represents a MArray with base type double.
  • Constructor Details

    • RasMArrayDouble

      public RasMArrayDouble()
      default constructor
    • RasMArrayDouble

      public RasMArrayDouble(RasMInterval initDomain)
      constructor for uninitialized MDD objects
      Parameters:
      initDomain - The initial Domain of the MArray
    • RasMArrayDouble

      public RasMArrayDouble(RasMInterval initDomain, boolean allocateData)
      constructor for uninitialized MDD objects
      Parameters:
      initDomain - The initial Domain of the MArray
      allocateData - control whether to allocate the data or not
    • RasMArrayDouble

      public RasMArrayDouble(RasMInterval initDomain, RasStorageLayout stl)
      Constructor for uninitialized MDD objects with Storage Layout
      Parameters:
      initDomain - The initial Domain of the MArray
      RasStorageLayout - The storage layout to be used
    • RasMArrayDouble

      public RasMArrayDouble(RasMInterval initDomain, RasStorageLayout stl, boolean allocateData)
      Constructor for uninitialized MDD objects with Storage Layout
      Parameters:
      initDomain - The initial Domain of the MArray
      allocateData - control whether to allocate the data or not
      RasStorageLayout - The storage layout to be used
    • RasMArrayDouble

      public RasMArrayDouble(RasMArrayDouble obj)
      copy constructor
      Parameters:
      obj - a copy of this object will be created
  • Method Details

    • getCell

      subscript operator for read access of a cell. The cell value is returned as a byte[4] array. This kind of access to a cell is significantly slower than getDouble(), because each cell value has to be converted from double to a byte[SIZE_OF_DOUBLE] array. The user has to take care that each Cell value is stored, before getting the next Cell.
      Overrides:
      getCell in class RasGMArray
      Parameters:
      point - the coordinates of the requested cell
      Returns:
      a byte array representing the value of the requested cell.
      Throws:
      RasDimensionMismatchException
      RasIndexOutOfBoundsException
    • getDouble

      public double getDouble(RasPoint point) throws RasDimensionMismatchException, RasIndexOutOfBoundsException
      subscript operator for read access of a cell. The cell value is returned as an double. This access method is faster then getCell(), because no conversion from double to Byte[SIZE_OF_DOUBLE] has to be done.
      Throws:
      RasDimensionMismatchException
      RasIndexOutOfBoundsException
    • getDoubleArray

      public double[] getDoubleArray()
      get the internal representation of the array
    • getArray

      public byte[] getArray()
      get the internal representation of the array in bytes, please use getDoubleArray()
      Overrides:
      getArray in class RasGMArray
      Returns:
      the byte array representing this GMArray
    • setArray

      public void setArray(double[] newData)
      set the internal representation of the array