public interface ArrayND
| Modifier and Type | Method and Description |
|---|---|
default java.util.stream.Stream<? extends MutableIntTuple> |
coordinates()
Returns a stream of the coordinates of this array.
|
Order |
getPreferredIterationOrder()
Returns the preferred iteration
Order of this array, or
null if this array does not have any preferred
iteration order. |
IntTuple |
getSize()
Returns the size of the array.
|
int |
getTotalSize()
Returns the total size of this array.
|
ArrayND |
subArray(IntTuple fromIndices,
IntTuple toIndices)
Returns a view on a portion of this array.
|
IntTuple getSize()
int getTotalSize()
size along all dimensions.Order getPreferredIterationOrder()
Order of this array, or
null if this array does not have any preferred
iteration order.Orderdefault java.util.stream.Stream<? extends MutableIntTuple> coordinates()
preferred iteration order.
(For example, for a 2D array, it may return the coordinates that
either represent a row-major, or a column-major iteration order).Coordinates.coordinates(IntTuple)
may be used, passing in the size of the array.Coordinates.lexicographicalCoordinates(IntTuple)
or Coordinates.colexicographicalCoordinates(IntTuple)
may be used.ArrayND subArray(IntTuple fromIndices, IntTuple toIndices)
fromIndices - The start indices of the sub-array along
each dimension (inclusive)toIndices - The end indices of the sub-array along
each dimension (exclusive)NullPointerException - if any of the given indices are
nullIllegalArgumentException - If the indices are not valid. This
is the case when the size of the start- or
end indices is different than the size of the getSize() of
this array, or when
fromIndex < 0 or
toIndex > size(i)
or fromIndex > toIndex for any dimension.Copyright © 2015. All Rights Reserved.