Class IndexedTensor.Indexes

  • Enclosing class:
    IndexedTensor

    public abstract static class IndexedTensor.Indexes
    extends java.lang.Object
    An array of indexes into this tensor which are able to find the next index in the value order. next() can be called once per element in the dimensions we iterate over. It must be called once before accessing the first position.
    • Field Detail

      • indexes

        protected final long[] indexes
    • Method Detail

      • of

        public static IndexedTensor.Indexes of​(TensorType type)
        Create indexes from a type containing bound indexed dimensions only.
        Throws:
        java.lang.IllegalStateException - if the type contains dimensions which are not bound and indexed
      • toAddress

        public TensorAddress toAddress()
        Returns the address of the current position of these indexes
      • indexesCopy

        public long[] indexesCopy()
      • indexesForReading

        public long[] indexesForReading()
        Returns a copy of the indexes of this which must not be modified
      • toSourceValueIndex

        public long toSourceValueIndex()
      • toList

        public java.util.List<java.lang.Long> toList()
        Returns an immutable list containing a copy of the indexes in this
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • size

        public abstract long size()
      • next

        public abstract void next()
      • hasNext

        public abstract boolean hasNext()
        Returns whether further values are available by calling next()