sidl
Class Enum.Array

java.lang.Object
  extended bygov.llnl.sidl.BaseArray
      extended bysidl.Integer.Array
          extended bysidl.Enum.Array
Direct Known Subclasses:
Enum.Array1, Enum.Array2, Enum.Array3, Enum.Array4, Enum.Array5, Enum.Array6, Enum.Array7
Enclosing class:
Enum

public static class Enum.Array
extends Integer.Array

Define a one dimensional array of type int for the sidl Java run-time. Many of these methods will throw array index exceptions if the specified indices are out of bounds.


Nested Class Summary
 
Nested classes inherited from class sidl.Integer.Array
Integer.Array.Holder
 
Field Summary
 
Fields inherited from class gov.llnl.sidl.BaseArray
d_array, d_owner
 
Constructor Summary
  Enum.Array()
          Construct an empty array object.
  Enum.Array(int dim, int[] lower, int[] upper, boolean isRow)
          Create an array with the specified lower and upper bounds.
protected Enum.Array(long array, boolean owner)
          Create an array using an IOR array pointer.
 
Method Summary
 void _copy(Enum.Array dest)
          copies the elements from this array to dest.
 Integer.Array _dcast()
          Casts this array to an array of a defined dimension and returns the resulting array.
 void _deallocate()
          Native routine to destroy (deallocate) the current array data.
 void _destroy()
          Native routine to destroy (deallocate) the current array data.
 int _dim()
          Native routine to get the dimension of the current array.
 int _get(int i, int j, int k, int l, int m, int n, int o)
          Native routine to fetch the specified value from the array.
 boolean _isColumnOrder()
          Abstract method returns true if array is ColumnOrder.
 boolean _isRowOrder()
          Abstract method returns true if array if RowOrder.
 int _lower(int dim)
          Native routine to fetch the specified lower bound of the array.
 void _reallocate(int dim, int[] lower, int[] upper, boolean isRow)
          Native routine to reallocate data in the array.
 void _set(int i, int j, int k, int l, int m, int n, int o, int value)
          Native routine to set the specified value in the array.
 Integer.Array _slice(int dimen, int[] numElem, int[] srcStart, int[] srcStride, int[] newStart)
          Routine to return an array based on this one, but slice according to your instructions
 Integer.Array _smartCopy()
          Copies borrowed arrays, addRefs otherwise.
 int _stride(int dim)
          Abstract method to fetch the stride of the specified dimen of the array.
 int _upper(int dim)
          Native routine to fetch the specified upper bound of the array.
 
Methods inherited from class sidl.Integer.Array
_addRef, _copy, _length
 
Methods inherited from class gov.llnl.sidl.BaseArray
checkBounds, checkBounds, checkBounds, checkBounds, checkBounds, checkBounds, checkBounds, checkDimension, checkIndexBounds, checkNullArray, destroy, dim, finalize, get_ior_pointer, get_owner, isNull, lower, reallocate, reset, set_ior_pointer, set_owner, stride, upper
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Enum.Array

public Enum.Array()
Construct an empty array object. This array object must be allocated with realllocate before any actions are performed on the array data.


Enum.Array

protected Enum.Array(long array,
                     boolean owner)
Create an array using an IOR array pointer. The pointer value may be zero (representing null).


Enum.Array

public Enum.Array(int dim,
                  int[] lower,
                  int[] upper,
                  boolean isRow)
Create an array with the specified lower and upper bounds. The upper bounds are inclusive. An array out of bounds exception is thrown if the array bounds or dimension are invalid.

Method Detail

_dim

public int _dim()
Native routine to get the dimension of the current array. This routine assumes that the array has already been initialized. If the array has not been initialized, then horrible things may happen.

Overrides:
_dim in class Integer.Array

_lower

public int _lower(int dim)
Native routine to fetch the specified lower bound of the array. The specified array dimension must be between zero and the array dimension minus one. Invalid values will have unpredictable (but almost certainly bad) results.

Overrides:
_lower in class Integer.Array

_upper

public int _upper(int dim)
Native routine to fetch the specified upper bound of the array. The specified array dimension must be between zero and the array dimension minus one. Invalid values will have unpredictable (but almost certainly bad) results.

Overrides:
_upper in class Integer.Array

_stride

public int _stride(int dim)
Abstract method to fetch the stride of the specified dimen of the array. This method will be implemented in subclasses as a native method. The specified array dimension must be between zero and the array dimension minus one. Invalid values will have unpredictable (but almost certainly bad) results.

Overrides:
_stride in class Integer.Array

_isColumnOrder

public boolean _isColumnOrder()
Abstract method returns true if array is ColumnOrder. This method will be implemented in subclasses as a native method.

Overrides:
_isColumnOrder in class Integer.Array

_isRowOrder

public boolean _isRowOrder()
Abstract method returns true if array if RowOrder. This method will be implemented in subclasses as a native method.

Overrides:
_isRowOrder in class Integer.Array

_get

public int _get(int i,
                int j,
                int k,
                int l,
                int m,
                int n,
                int o)
Native routine to fetch the specified value from the array. The specified array index/indices must be lie between the array lower upper bounds (inclusive). Invalid indices will have unpredictable (but almost certainly bad) results.

Overrides:
_get in class Integer.Array

_set

public void _set(int i,
                 int j,
                 int k,
                 int l,
                 int m,
                 int n,
                 int o,
                 int value)
Native routine to set the specified value in the array. The specified array index/indices must be lie between the array lower upper bounds (inclusive). Invalid indices will have unpredictable (but almost certainly bad) results.

Overrides:
_set in class Integer.Array

_destroy

public void _destroy()
Native routine to destroy (deallocate) the current array data.

Overrides:
_destroy in class Integer.Array

_reallocate

public void _reallocate(int dim,
                        int[] lower,
                        int[] upper,
                        boolean isRow)
Native routine to reallocate data in the array. The specified array dimension and indices must match and be within valid ranges (e.g., the upper bounds must be greater than or equal to lowe rbounds. Invalid indices will have unpredictable (but almost certainly bad) results. This routine will deallocate the existing array data if it is not null.

Overrides:
_reallocate in class Integer.Array

_deallocate

public void _deallocate()
Native routine to destroy (deallocate) the current array data.

Overrides:
_deallocate in class Integer.Array

_slice

public Integer.Array _slice(int dimen,
                            int[] numElem,
                            int[] srcStart,
                            int[] srcStride,
                            int[] newStart)
Routine to return an array based on this one, but slice according to your instructions

Overrides:
_slice in class Integer.Array

_smartCopy

public Integer.Array _smartCopy()
Copies borrowed arrays, addRefs otherwise.

Overrides:
_smartCopy in class Integer.Array

_copy

public void _copy(Enum.Array dest)
copies the elements from this array to dest. ARRAYS MUST BE THE SAME SIZE.


_dcast

public Integer.Array _dcast()
Description copied from class: Integer.Array
Casts this array to an array of a defined dimension and returns the resulting array. (You might want to deallocate the original array. Argument dimen determines what dimension array to cast this array to.

Overrides:
_dcast in class Integer.Array