sidl
Class Double.Array4

java.lang.Object
  extended bygov.llnl.sidl.BaseArray
      extended bysidl.Double.Array
          extended bysidl.Double.Array4
Enclosing class:
Double

public static class Double.Array4
extends Double.Array

Define a four dimensional array of type double. 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.


Field Summary
 
Fields inherited from class gov.llnl.sidl.BaseArray
d_array, d_owner
 
Constructor Summary
  Double.Array4()
          Create an empty four dimensional array.
  Double.Array4(double[][][][] array)
          Create a four dimensional array using the specified Java array.
  Double.Array4(int s0, int s1, int s2, int s3)
          Create a four dimenstional array of the specified size, with the lower index starting at zero.
  Double.Array4(int l0, int l1, int l2, int l3, int u0, int u1, int u2, int u3)
          Create a four dimensional array using the specified lower and upper bounds (where both bounds are inclusive).
protected Double.Array4(long array, boolean owner)
          Create a four dimensional array directly using the sidl pointer and owner flag.
 
Method Summary
 double _get(int i, int j, int k, int l)
          Get the specified array element without bounds checking.
 void _set(int i, int j, int k, int l, double value)
          Set the specified array element without bounds checking.
 double[][][][] get()
          Convert the sidl array into a Java array.
 double get(int i, int j, int k, int l)
          Get the specified array element with bounds checking.
 void reallocate(int l0, int l1, int l2, int l3, int u0, int u1, int u2, int u3)
          Reallocate array data using the specifed lower and upper bounds.
 void set(double[][][][] array)
          Set the value of the sidl array from the Java array.
 void set(int i, int j, int k, int l, double value)
          Set the specified array element with bounds checking.
 
Methods inherited from class sidl.Double.Array
_destroy, _dim, _lower, _reallocate, _upper
 
Methods inherited from class gov.llnl.sidl.BaseArray
checkBounds, checkBounds, checkBounds, checkBounds, checkDimension, checkIndexBounds, checkNullArray, destroy, dim, finalize, isNull, lower, reallocate, reset, upper
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Double.Array4

public Double.Array4()
Create an empty four dimensional array. The array will need to be initialized before use.


Double.Array4

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


Double.Array4

public Double.Array4(int l0,
                     int l1,
                     int l2,
                     int l3,
                     int u0,
                     int u1,
                     int u2,
                     int u3)
Create a four 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.


Double.Array4

public Double.Array4(int s0,
                     int s1,
                     int s2,
                     int s3)
Create a four 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.


Double.Array4

public Double.Array4(double[][][][] array)
Create a four 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

_get

public double _get(int i,
                   int j,
                   int k,
                   int l)
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.

Overrides:
_get in class Double.Array

get

public double get(int i,
                  int j,
                  int k,
                  int l)
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 u0,
                       int u1,
                       int u2,
                       int u3)
Reallocate array data using the specifed lower and upper bounds. The upper bound is inclusive. Previous array data will be freed.


_set

public void _set(int i,
                 int j,
                 int k,
                 int l,
                 double 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.

Overrides:
_set in class Double.Array

set

public void set(int i,
                int j,
                int k,
                int l,
                double 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.


get

public double[][][][] get()
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.


set

public void set(double[][][][] 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.