Package ai.djl.ndarray.index.dim
Class NDIndexFixed
java.lang.Object
ai.djl.ndarray.index.dim.NDIndexFixed
- All Implemented Interfaces:
NDIndexElement
An NDIndexElement that returns only a specific value in the corresponding dimension.
-
Constructor Summary
ConstructorsConstructorDescriptionNDIndexFixed(long index) Constructs aNDIndexFixedinstance with specified dimension. -
Method Summary
-
Constructor Details
-
NDIndexFixed
public NDIndexFixed(long index) Constructs aNDIndexFixedinstance with specified dimension.- Parameters:
index- the dimension of the NDArray
-
-
Method Details
-
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
-