Class NDIndexFixed

java.lang.Object
ai.djl.ndarray.index.dim.NDIndexFixed
All Implemented Interfaces:
NDIndexElement

public class NDIndexFixed extends Object implements NDIndexElement
An NDIndexElement that returns only a specific value in the corresponding dimension.
  • Constructor Details

    • NDIndexFixed

      public NDIndexFixed(long index)
      Constructs a NDIndexFixed instance 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:
      getRank in interface NDIndexElement
      Returns:
      the number of dimensions occupied by this index element