Package uk.ac.rdg.resc.edal.util
Class Array4D<T>
- java.lang.Object
-
- uk.ac.rdg.resc.edal.util.Array4D<T>
-
- Direct Known Subclasses:
ValuesArray4D
public abstract class Array4D<T> extends Object implements Array<T>
-
-
Constructor Summary
Constructors Constructor Description Array4D(int tSize, int zSize, int ySize, int xSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNDim()
Gets the number of dimensions of the array.int[]
getShape()
Gets the shape of the array, i.e.int
getTIndex()
int
getTSize()
Convenience method to get the size in the t-directionint
getXIndex()
int
getXSize()
Convenience method to get the size in the x-directionint
getYIndex()
int
getYSize()
Convenience method to get the size in the y-directionint
getZIndex()
int
getZSize()
Convenience method to get the size in the z-directionIterator<T>
iterator()
Returns an iterator over all the values in the array.long
size()
Gets the number of values in the array.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
X_IND
protected static final int X_IND
- See Also:
- Constant Field Values
-
Y_IND
protected static final int Y_IND
- See Also:
- Constant Field Values
-
Z_IND
protected static final int Z_IND
- See Also:
- Constant Field Values
-
T_IND
protected static final int T_IND
- See Also:
- Constant Field Values
-
-
Method Detail
-
getNDim
public final int getNDim()
Description copied from interface:Array
Gets the number of dimensions of the array. Equal to getShape().length.
-
iterator
public Iterator<T> iterator()
Description copied from interface:Array
Returns an iterator over all the values in the array. The convention is that the last dimension (represented by the last entry in getShape()) varies fastest.
-
size
public long size()
Description copied from interface:Array
Gets the number of values in the array.
-
getShape
public int[] getShape()
Description copied from interface:Array
Gets the shape of the array, i.e. the number of points in each direction.
-
getXSize
public int getXSize()
Convenience method to get the size in the x-direction
-
getYSize
public int getYSize()
Convenience method to get the size in the y-direction
-
getZSize
public int getZSize()
Convenience method to get the size in the z-direction
-
getTSize
public int getTSize()
Convenience method to get the size in the t-direction
-
getXIndex
public int getXIndex()
- Returns:
- The index used for x values
-
getYIndex
public int getYIndex()
- Returns:
- The index used for y values
-
getZIndex
public int getZIndex()
- Returns:
- The index used for z values
-
getTIndex
public int getTIndex()
- Returns:
- The index used for t values
-
-