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 INDArrayIndexdup()Deep copy of thisINDArrayIndexlongend()The ending for this indexvoidinit(long begin, long end)Initialize based on the specified begin and endvoidinit(long begin, long end, long max)voidinit(INDArray arr, int dimension)Init the index wrt the dimension and the given nd arrayvoidinit(INDArray arr, long begin, int dimension)Init the index wrt the dimension and the given nd arraybooleaninitialized()Returns true if this index has been initialized.booleanisInterval()Returns true if the index is an intervallonglength()The total length of this index (end - start)longoffset()The start of this indexvoidreverse()Reverse the indexeslongstride()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:
-
-