|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.javaseis.array.MultiArray
public class MultiArray
| Field Summary | |
|---|---|
protected int |
_arrayLength
|
protected int |
_bufLength
|
protected java.lang.Class |
_classType
|
protected int |
_elementCount
|
protected int |
_frameLength
|
protected int |
_hypercubeLength
|
protected int[] |
_lengths
|
protected int |
_maxIndex
|
protected int |
_ndim
|
protected int |
_offset
|
protected int[] |
_offsetMultiplier
|
protected int |
_traceLength
|
protected int |
_volumeLength
|
protected byte[] |
bytes
|
protected double[] |
doubles
|
protected float[] |
floats
|
protected int[] |
ints
|
protected long[] |
longs
|
protected java.lang.Object[] |
objects
|
protected short[] |
shorts
|
| Constructor Summary | |
|---|---|
MultiArray()
Default constructor |
|
MultiArray(int ndim,
java.lang.Class classType,
int[] lengths)
Constructor to create a new SeismicArray without storage. |
|
| Method Summary | ||
|---|---|---|
void |
allocate()
Convenience method to allocate primitive storage once all other fields are set |
|
byte[] |
bytes()
|
|
IMultiArray |
clone()
|
|
void |
deallocate()
Convenience method to de-reference the underlying storage |
|
double[] |
doubles()
|
|
static MultiArray |
factory(int ndim,
java.lang.Class classType,
int elementCount,
int[] lengths)
Factory method to create a new SeismicArray with allocated storage |
|
static
|
factory(int ndim,
T[] obuf,
int count,
int[] lengths)
Factory method to create a new SeismicArray from an array of objects |
|
static MultiArray |
float2D(int n1,
int n2)
Factory method to create a new 2D float array |
|
static MultiArray |
float3D(int n1,
int n2,
int n3)
Factory method to create a new 3D float array |
|
float[] |
floats()
|
|
int |
getDimensions()
Return the number of dimensions in this MultiArray |
|
int |
getElementCount()
|
|
void |
getFrame(byte[][] buf,
int[] position)
|
|
void |
getFrame(double[][] buf,
int[] position)
|
|
void |
getFrame(float[][] buf,
int[] position)
|
|
void |
getFrame(int[][] buf,
int[] position)
|
|
void |
getFrame(long[][] buf,
int[] position)
|
|
void |
getFrame(short[][] buf,
int[] position)
|
|
|
getFrame(T[][] buf,
int[] position)
Place a 2-dimensional array of values into the multiarray |
|
int |
getLength(int index)
Return the length of a particular dimension |
|
int |
getOffset()
Return the zero-based offset within the underlying storage for this array |
|
int[] |
getShape()
Return the length of each dimension in this MultiArray |
|
void |
getTrace(byte[] buf,
int[] position)
|
|
void |
getTrace(double[] buf,
int[] position)
|
|
void |
getTrace(float[] buf,
int[] position)
|
|
void |
getTrace(int[] buf,
int[] position)
|
|
void |
getTrace(long[] buf,
int[] position)
|
|
void |
getTrace(short[] buf,
int[] position)
|
|
|
getTrace(T[] buf,
int[] position)
Return a 1-dimensional array of values from the multiarray |
|
int |
index(int[] position)
Return the index in the underlying storage of the data at a particular position in the MultiArray |
|
int |
index(int[] position,
int element)
Return the index in the underlying storage of an element at a particular position in the MultiArray. |
|
int |
indexFortran(int[] position)
Return the index in the underlying storage of the data at a particular position in the MultiArray. |
|
int |
indexFortran(int[] position,
int element)
Return the index in the underlying storage of an element at a particular position in the MultiArray. |
|
int[] |
ints()
|
|
long[] |
longs()
|
|
static void |
main(java.lang.String[] args)
|
|
|
objects()
Return the underlying storage for this MultiArray as a 1D array |
|
void |
putFrame(byte[][] buf,
int[] position)
|
|
void |
putFrame(double[][] buf,
int[] position)
|
|
void |
putFrame(float[][] buf,
int[] position)
|
|
void |
putFrame(int[][] buf,
int[] position)
|
|
void |
putFrame(long[][] buf,
int[] position)
|
|
void |
putFrame(short[][] buf,
int[] position)
|
|
|
putFrame(T[][] buf,
int[] position)
Place a 2-dimensional array of values into the multiarray |
|
void |
putTrace(byte[] buf,
int[] position)
|
|
void |
putTrace(double[] buf,
int[] position)
|
|
void |
putTrace(float[] buf,
int[] position)
|
|
void |
putTrace(int[] buf,
int[] position)
|
|
void |
putTrace(long[] buf,
int[] position)
|
|
void |
putTrace(short[] buf,
int[] position)
|
|
|
putTrace(T[] buf,
int[] position)
Place a 1-dimensional array of values into the multiarray |
|
int[] |
range(int[] position,
int dimension)
Return a zero-based index triplet defining start,end,increment that will traverse a specified dimension for this MultiArray. |
|
int[] |
range(int[] position,
int dimension,
int start,
int end,
int increment)
Return a zero-based index triplet defining start,end,increment that can be used to access the elements of the underlying 1D array storage for this MultiArray. |
|
int[] |
range(int[] position,
int dimension,
int start,
int end,
int increment,
int element)
Return a zero-based index triplet defining start,end,increment that can be used to access individual elements of the underlying 1D array storage for this MultiArray. |
|
int[] |
rangeFortran(int[] position,
int dimension)
Return a zero-based index triplet defining start,end,increment that will traverse a specified dimension for this MultiArray. |
|
int[] |
rangeFortran(int[] position,
int dimension,
int start,
int end,
int increment)
Return a Fortran index triplet defining start,end,increment that can be used to access the elements of the underlying 1D array storage for this MultiArray. |
|
int[] |
rangeFortran(int[] position,
int dimension,
int start,
int end,
int increment,
int element)
Return a Fortran style index triplet defining start,end,increment that can be used to access individual elements of the underlying 1D array storage for this MultiArray. |
|
void |
setArray(byte[] buf)
|
|
void |
setArray(double[] buf)
|
|
void |
setArray(float[] buf)
|
|
void |
setArray(int[] buf)
|
|
void |
setArray(long[] buf)
|
|
void |
setArray(short[] buf)
|
|
|
setArray(T[] buf)
Provide the array that is used for underlying storage The "object" version is a generic method that handles arbitrary objects The rest of the methods are for primitive types |
|
void |
setClassType(java.lang.Class classType)
Set the class type of this MultiArray |
|
void |
setDimensions(int ndim)
Set the number of dimensions for this MultiArray |
|
void |
setElementCount(int elementCount)
Set the element count for this MultiArray |
|
void |
setOffset(int offset)
Set the zero-based offset within the underlying storage for this array |
|
void |
setShape(int[] lengths)
Set the shape of this MultiArray, in Fortran style with the "fast" dimension first |
|
short[] |
shorts()
|
|
void |
tran1243()
Transpose the third and fourth dimensions of this MultiArray |
|
void |
tran132()
Transpose the second and third dimensions of an MultiArray |
|
void |
tran21()
Transpose the first two dimensions of a MultiArray If the number of elements per sample is not 1, the transpose is "promoted" to tran132 using the element count as the first dimension. |
|
void |
transpose(TransposeType type)
Apply the requested transpose to this MultiArray |
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int _arrayLength
protected int _bufLength
protected java.lang.Class _classType
protected int _elementCount
protected int _frameLength
protected int _hypercubeLength
protected int[] _lengths
protected int _maxIndex
protected int _ndim
protected int _offset
protected int[] _offsetMultiplier
protected int _traceLength
protected int _volumeLength
protected byte[] bytes
protected double[] doubles
protected float[] floats
protected int[] ints
protected long[] longs
protected java.lang.Object[] objects
protected short[] shorts
| Constructor Detail |
|---|
public MultiArray()
public MultiArray(int ndim,
java.lang.Class classType,
int[] lengths)
ndim - number of dimensionsdataType - dat type for the storagelengths - length of each axis| Method Detail |
|---|
public void allocate()
public byte[] bytes()
bytes in interface IMultiArraypublic IMultiArray clone()
clone in interface IMultiArrayclone in class java.lang.Objectpublic void deallocate()
public double[] doubles()
doubles in interface IMultiArray
public static MultiArray factory(int ndim,
java.lang.Class classType,
int elementCount,
int[] lengths)
ndim - number of dimensionsdataType - dat type for the storagelengths - length of each axis
public static <T> MultiArray factory(int ndim,
T[] obuf,
int count,
int[] lengths)
ndim - number of dimensionsobuf - 1D java array of objectscount - element count for each samplelengths - length of each axis
public static MultiArray float2D(int n1,
int n2)
n1 - length of first dimensionn2 - length of second dimension
public static MultiArray float3D(int n1,
int n2,
int n3)
n1 - length of first dimensionn2 - length of second dimensionn3 - length of third dimension
public float[] floats()
floats in interface IMultiArraypublic int getDimensions()
IMultiArray
getDimensions in interface IMultiArraypublic int getElementCount()
public void getFrame(byte[][] buf,
int[] position)
getFrame in interface IMultiArray
public void getFrame(double[][] buf,
int[] position)
getFrame in interface IMultiArray
public void getFrame(float[][] buf,
int[] position)
getFrame in interface IMultiArray
public void getFrame(int[][] buf,
int[] position)
getFrame in interface IMultiArray
public void getFrame(long[][] buf,
int[] position)
getFrame in interface IMultiArray
public void getFrame(short[][] buf,
int[] position)
getFrame in interface IMultiArray
public <T> void getFrame(T[][] buf,
int[] position)
IMultiArray
getFrame in interface IMultiArraybuf - array to be placed into the multiarrayposition - zero-based index location in fortran orderpublic int getLength(int index)
IMultiArray
getLength in interface IMultiArrayindex - the index of the dimension whose length will be returned
public int getOffset()
IMultiArray
getOffset in interface IMultiArraypublic int[] getShape()
IMultiArray
getShape in interface IMultiArray
public void getTrace(byte[] buf,
int[] position)
getTrace in interface IMultiArray
public void getTrace(double[] buf,
int[] position)
getTrace in interface IMultiArray
public void getTrace(float[] buf,
int[] position)
getTrace in interface IMultiArray
public void getTrace(int[] buf,
int[] position)
getTrace in interface IMultiArray
public void getTrace(long[] buf,
int[] position)
getTrace in interface IMultiArray
public void getTrace(short[] buf,
int[] position)
getTrace in interface IMultiArray
public <T> void getTrace(T[] buf,
int[] position)
IMultiArray
getTrace in interface IMultiArraybuf - array to receive data from the multiarrayposition - zero-based index location in fortran orderpublic int index(int[] position)
IMultiArray
index in interface IMultiArrayposition - position of the sample to be accessed using zero-based indices
public int index(int[] position,
int element)
IMultiArray
index in interface IMultiArrayposition - position of the sample to be accessed using zero-based indiceselement - index of the "sample" "element" that will be accessed
public int indexFortran(int[] position)
IMultiArray
indexFortran in interface IMultiArrayposition - position of the sample to be accessed using Fortran indices
public int indexFortran(int[] position,
int element)
IMultiArray
indexFortran in interface IMultiArrayposition - position of the sample to be accessed using Fortran indiceselement - index of the "sample" "element" that will be accessed
public int[] ints()
ints in interface IMultiArraypublic long[] longs()
longs in interface IMultiArraypublic static void main(java.lang.String[] args)
args - public <T> T[] objects()
IMultiArray
objects in interface IMultiArray
public void putFrame(byte[][] buf,
int[] position)
putFrame in interface IMultiArray
public void putFrame(double[][] buf,
int[] position)
putFrame in interface IMultiArray
public void putFrame(float[][] buf,
int[] position)
putFrame in interface IMultiArray
public void putFrame(int[][] buf,
int[] position)
putFrame in interface IMultiArray
public void putFrame(long[][] buf,
int[] position)
putFrame in interface IMultiArray
public void putFrame(short[][] buf,
int[] position)
putFrame in interface IMultiArray
public <T> void putFrame(T[][] buf,
int[] position)
IMultiArray
putFrame in interface IMultiArraybuf - array to be placed into the multiarrayposition - zero-based index location in fortran order
public void putTrace(byte[] buf,
int[] position)
putTrace in interface IMultiArray
public void putTrace(double[] buf,
int[] position)
putTrace in interface IMultiArray
public void putTrace(float[] buf,
int[] position)
putTrace in interface IMultiArray
public void putTrace(int[] buf,
int[] position)
putTrace in interface IMultiArray
public void putTrace(long[] buf,
int[] position)
putTrace in interface IMultiArray
public void putTrace(short[] buf,
int[] position)
putTrace in interface IMultiArray
public <T> void putTrace(T[] buf,
int[] position)
IMultiArray
putTrace in interface IMultiArraybuf - array to be placed into the multiarrayposition - zero-based index location in fortran order
public int[] range(int[] position,
int dimension)
IMultiArray
range in interface IMultiArrayposition - starting position in Fortran style indexingdimension - the dimension that will be traversed
public int[] range(int[] position,
int dimension,
int start,
int end,
int increment)
IMultiArray
range in interface IMultiArrayposition - starting position in Fortran style indexingdimension - the dimension that will be traversedstart - start index along the requested dimensionend - ending indexincrement - index increment
public int[] range(int[] position,
int dimension,
int start,
int end,
int increment,
int element)
IMultiArray
range in interface IMultiArrayposition - starting position in Fortran style indexingdimension - the dimension that will be traversedstart - start index along the requested dimensionend - ending indexincrement - index incrementelement - the index of the element that will be accessed for the range selection
public int[] rangeFortran(int[] position,
int dimension)
IMultiArray
rangeFortran in interface IMultiArrayposition - starting position in Fortran style indexingdimension - the dimension that will be traversed
public int[] rangeFortran(int[] position,
int dimension,
int start,
int end,
int increment)
IMultiArray
rangeFortran in interface IMultiArrayposition - starting position in Fortran style indexingdimension - the dimension that will be traversedstart - start index along the requested dimensionend - ending indexincrement - index increment
public int[] rangeFortran(int[] position,
int dimension,
int start,
int end,
int increment,
int element)
IMultiArray
rangeFortran in interface IMultiArrayposition - starting position in Fortran style indexingdimension - the dimension that will be traversedstart - start index along the requested dimensionend - ending indexincrement - index incrementelement - the index of the element that will be accessed for the range selection
public void setArray(byte[] buf)
setArray in interface IMultiArraypublic void setArray(double[] buf)
setArray in interface IMultiArraypublic void setArray(float[] buf)
setArray in interface IMultiArraypublic void setArray(int[] buf)
setArray in interface IMultiArraypublic void setArray(long[] buf)
setArray in interface IMultiArraypublic void setArray(short[] buf)
setArray in interface IMultiArraypublic <T> void setArray(T[] buf)
IMultiArray
setArray in interface IMultiArraybuf - array that is used for underlying storagepublic void setClassType(java.lang.Class classType)
IMultiArray
setClassType in interface IMultiArrayclassType - - the class type for this arraypublic void setDimensions(int ndim)
IMultiArray
setDimensions in interface IMultiArrayndim - number of dimensionspublic void setElementCount(int elementCount)
IMultiArray
setElementCount in interface IMultiArrayelementCount - - the number of "elements" per "sample"public void setOffset(int offset)
IMultiArray
setOffset in interface IMultiArrayoffset - zero based offset to the start of this arraypublic void setShape(int[] lengths)
IMultiArray
setShape in interface IMultiArraylengths - length of each dimensionpublic short[] shorts()
shorts in interface IMultiArraypublic void tran1243()
public void tran132()
public void tran21()
public void transpose(TransposeType type)
transpose in interface IMultiArraytype - the type of transpose to apply
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||