Package org.nd4j.linalg.indexing
Interface INDArrayIndex
-
- All Known Implementing Classes:
IntervalIndex
,NDArrayIndex
,NDArrayIndexAll
,NewAxis
,PointIndex
,SpecifiedIndex
public interface INDArrayIndex
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description INDArrayIndex
dup()
Deep copy of thisINDArrayIndex
long
end()
The ending for this indexvoid
init(long begin, long end)
Initialize based on the specified begin and endvoid
init(long begin, long end, long max)
void
init(INDArray arr, int dimension)
Init the index wrt the dimension and the given nd arrayvoid
init(INDArray arr, long begin, int dimension)
Init the index wrt the dimension and the given nd arrayboolean
initialized()
Returns true if this index has been initialized.boolean
isInterval()
Returns true if the index is an intervallong
length()
The total length of this index (end - start)long
offset()
The start of this indexvoid
reverse()
Reverse the indexeslong
stride()
The stride for the index (most of the time will be 1)
-
-
-
Method Detail
-
end
long end()
The ending for this index- Returns:
-
offset
long offset()
The start of this index- Returns:
-
length
long length()
The total length of this index (end - start)- Returns:
-
stride
long stride()
The stride for the index (most of the time will be 1)- Returns:
-
reverse
void reverse()
Reverse the indexes
-
isInterval
boolean isInterval()
Returns true if the index is an interval- Returns:
-
init
void init(INDArray arr, long begin, int dimension)
Init the index wrt the dimension and the given nd array- Parameters:
arr
- the array to initialize onbegin
- the beginning indexdimension
- the dimension to initialize on
-
init
void init(INDArray arr, int dimension)
Init the index wrt the dimension and the given nd array- Parameters:
arr
- the array to initialize ondimension
- the dimension to initialize on
-
init
void init(long begin, long end, long max)
-
init
void init(long begin, long end)
Initialize based on the specified begin and end- Parameters:
begin
-end
-
-
initialized
boolean initialized()
Returns true if this index has been initialized. Sometimes indices may define certain constraints such as negative indices that may not be resolved until use.INDArray.get(INDArrayIndex...)
will check for when an index is initialized and if not initialize it upon use.- Returns:
-
dup
INDArrayIndex dup()
Deep copy of thisINDArrayIndex
- Returns:
-
-