sidl
Class Opaque.Array6

java.lang.Object
  extended by gov.llnl.sidl.BaseArray
      extended by sidl.Opaque.Array
          extended by sidl.Opaque.Array6
Enclosing class:
Opaque

public static class Opaque.Array6
extends Opaque.Array

Define a six dimensional array of type long. This array representation is used for sidl arrays since it requires no copies to go between Java and sidl. Explicit copies may be made of the array by calling the appropriate get and set methods.


Nested Class Summary
static class Opaque.Array6.Holder
           
 
Field Summary
 
Fields inherited from class gov.llnl.sidl.BaseArray
d_array, d_owner
 
Constructor Summary
  Opaque.Array6()
          Create an empty six dimensional array.
  Opaque.Array6(int s0, int s1, int s2, int s3, int s4, int s5, boolean isRow)
          Create a six dimenstional array of the specified size, with the lower index starting at zero.
  Opaque.Array6(int l0, int l1, int l2, int l3, int l4, int l5, int u0, int u1, int u2, int u3, int u4, int u5, boolean isRow)
          Create a six dimensional array using the specified lower and upper bounds (where both bounds are inclusive).
  Opaque.Array6(long[][][][][][] array)
          Create a six dimensional array using the specified Java array.
protected Opaque.Array6(long array, boolean owner)
          Create a six dimensional array directly using the sidl pointer and owner flag.
 
Method Summary
 long _get(int i, int j, int k, int l, int m, int n)
          Get the specified array element without bounds checking.
 void _set(int i, int j, int k, int l, int m, int n, long value)
          Set the specified array element without bounds checking.
 void copy(Opaque.Array6 dest)
          Method Copy copies the elements of 'this' to an already existing array of the same size.
 void fromArray(long[][][][][][] array)
          Set the value of the sidl array from the Java array.
 long get(int i, int j, int k, int l, int m, int n)
          Get the specified array element with bounds checking.
 int length(int dim)
          Routine gets length of the array in the specified dimension
 void reallocate(int l0, int l1, int l2, int l3, int l4, int l5, int u0, int u1, int u2, int u3, int u4, int u5, boolean isRow)
          Reallocate array data using the specifed lower and upper bounds.
 void set(int i, int j, int k, int l, int m, int n, long value)
          Set the specified array element with bounds checking.
 Opaque.Array6 smartCopy()
          Method smartCopy returns a a copy of a borrowed array, or increments the reference count of an array that manages it's own data.
 long[][][][][][] toArray()
          Convert the sidl array into a Java array.
 
Methods inherited from class sidl.Opaque.Array
_copy, _dcast, _get, _reallocate, _set, _slice
 
Methods inherited from class gov.llnl.sidl.BaseArray
_addRef, _deallocate, _destroy, _dim, _isColumnOrder, _isRowOrder, _length, _lower, _smartCopy, _stride, _type, _upper, 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

Opaque.Array6

public Opaque.Array6()
Create an empty six dimensional array. The array will need to be initialized before use.


Opaque.Array6

protected Opaque.Array6(long array,
                        boolean owner)
Create a six dimensional array directly using the sidl pointer and owner flag. This constructor should only be called by the sidl runtime.


Opaque.Array6

public Opaque.Array6(int l0,
                     int l1,
                     int l2,
                     int l3,
                     int l4,
                     int l5,
                     int u0,
                     int u1,
                     int u2,
                     int u3,
                     int u4,
                     int u5,
                     boolean isRow)
Create a six dimensional array using the specified lower and upper bounds (where both bounds are inclusive). This constructor will throw an array bounds out of range exception if the array bounds are invalid.


Opaque.Array6

public Opaque.Array6(int s0,
                     int s1,
                     int s2,
                     int s3,
                     int s4,
                     int s5,
                     boolean isRow)
Create a six dimenstional array of the specified size, with the lower index starting at zero. This constructor will throw an array bounds out of range exception if the array bounds are invalid.


Opaque.Array6

public Opaque.Array6(long[][][][][][] array)
Create a six dimensional array using the specified Java array. The lower bound(s) of the constructed array will start at zero. An array index out of range exception will be thrown if the bounds are invalid.

Method Detail

length

public int length(int dim)
Routine gets length of the array in the specified dimension


_get

public long _get(int i,
                 int j,
                 int k,
                 int l,
                 int m,
                 int n)
Get the specified array element without bounds checking. If the index is invalid, then bad things may happen. If you are unsure whether the index is valid, then use get instead.


get

public long get(int i,
                int j,
                int k,
                int l,
                int m,
                int n)
Get the specified array element with bounds checking. If the index is invalid, then an array index out of bounds exception will be thrown.


reallocate

public void reallocate(int l0,
                       int l1,
                       int l2,
                       int l3,
                       int l4,
                       int l5,
                       int u0,
                       int u1,
                       int u2,
                       int u3,
                       int u4,
                       int u5,
                       boolean isRow)
Reallocate array data using the specifed lower and upper bounds. The upper bound is inclusive. Previous array data will be freed.


smartCopy

public Opaque.Array6 smartCopy()
Method smartCopy returns a a copy of a borrowed array, or increments the reference count of an array that manages it's own data. Useful if you wish to keep a copy of an incoming array


copy

public void copy(Opaque.Array6 dest)
Method Copy copies the elements of 'this' to an already existing array of the same size.


_set

public void _set(int i,
                 int j,
                 int k,
                 int l,
                 int m,
                 int n,
                 long value)
Set the specified array element without bounds checking. If the index is invalid, then bad things may happen. If you are unsure whether the index is valid, then use set instead.


set

public void set(int i,
                int j,
                int k,
                int l,
                int m,
                int n,
                long value)
Set the specified array element with bounds checking. If the index is invalid, then an array index out of bounds exception will be thrown.


toArray

public long[][][][][][] toArray()
Convert the sidl array into a Java array. This method will copy the sidl array into the Java array. The resulting Java array will (obviously) start with a zero lower bound. If the sidl array is empty (null), then a null Java array will be returned.


fromArray

public void fromArray(long[][][][][][] array)
Set the value of the sidl array from the Java array. This method will copy the Java array values into the sidl array, reallocating the memory of the sidl array as necessary. The resulting sidl array will start with a zero lower bound. If the Java array is null, then the sidl array will be null, as well. Note that multidimensional Java arrays must not be ragged; that is, all sub-arrays in a particular dimension must have the same size. Otherwise, some data may be missed or this method may throw an array index out of bounds exception.