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 aNDIndexFixedinstance with specified dimension.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetIndex()Returns the dimension of the index.intgetRank()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:
getRankin interfaceNDIndexElement- Returns:
- the number of dimensions occupied by this index element
-
-