Package ai.djl.ndarray.index.dim
Class NDIndexFixed
- java.lang.Object
-
- ai.djl.ndarray.index.dim.NDIndexFixed
-
- All Implemented Interfaces:
NDIndexElement
public class NDIndexFixed extends java.lang.Object implements NDIndexElement
An NDIndexElement that returns only a specific value in the corresponding dimension.
-
-
Constructor Summary
Constructors Constructor Description NDIndexFixed(long index)
Constructs aNDIndexFixed
instance with specified dimension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getIndex()
Returns the dimension of the index.int
getRank()
Returns the number of dimensions occupied by this index element.
-
-
-
Method Detail
-
getIndex
public long getIndex()
Returns the dimension of the index.- Returns:
- the dimension of the index
-
getRank
public int getRank()
Returns the number of dimensions occupied by this index element.- Specified by:
getRank
in interfaceNDIndexElement
- Returns:
- the number of dimensions occupied by this index element
-
-