public interface IArrayAccessor<T>
Modifier and Type | Method and Description |
---|---|
T[] |
getArray() |
int[] |
getDimensions() |
T |
getElementAt(int[] coordinates) |
int |
getIndexAt(int[] coordinates)
Retrieves the index in the flattened one dimensional array at the given
coordinates of the multi-dimensional array.
|
java.util.List<Slice<T>> |
getSlices(int dim1,
int dim2)
Get the list of 2-D slices of the multi-dimensional array along the given
dimensions.
|
SubspaceSlice<T> |
getSubspaceSliceAt(int[] coordinates,
int... subDims) |
java.util.List<SubspaceSlice<T>> |
getSubspaceSlices(int... dims)
Get all the subspace slices of the multi-dimensional array.
|
int getIndexAt(int[] coordinates)
coordinates
- The coordinates of the array element whose index is to be
retrieved. Must be the same length as the length of dimensions
of the multi-dimensional array.T[] getArray()
int[] getDimensions()
T getElementAt(int[] coordinates)
coordinates
- The coordinates at which the element is retrieved.java.util.List<Slice<T>> getSlices(int dim1, int dim2)
dim1
- The first dimension of the slices.dim2
- The second dimension of the slices.SubspaceSlice<T> getSubspaceSliceAt(int[] coordinates, int... subDims)
coordinates
- The coordinates at which the subspace slice is retrieved.
Note: coordinates
should have the same length as
the dimensions of the array.subDims
- Indices for the dimensions of the subspace.java.util.List<SubspaceSlice<T>> getSubspaceSlices(int... dims)