Class UShortBufferIndexer

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class UShortBufferIndexer
    extends UShortIndexer
    An indexer for a ShortBuffer, treated as unsigned.
    • Field Detail

      • buffer

        protected java.nio.ShortBuffer buffer
        The backing buffer.
    • Constructor Detail

      • UShortBufferIndexer

        public UShortBufferIndexer​(java.nio.ShortBuffer buffer)
        Calls UShortBufferIndexer(buffer, Index.create(buffer.limit())).
      • UShortBufferIndexer

        public UShortBufferIndexer​(java.nio.ShortBuffer buffer,
                                   long... sizes)
        Calls UShortBufferIndexer(buffer, Index.create(sizes)).
      • UShortBufferIndexer

        public UShortBufferIndexer​(java.nio.ShortBuffer buffer,
                                   long[] sizes,
                                   long[] strides)
        Calls UShortBufferIndexer(buffer, Index.create(sizes, strides)).
      • UShortBufferIndexer

        public UShortBufferIndexer​(java.nio.ShortBuffer buffer,
                                   Index index)
        Constructor to set the buffer and Indexer.index.
    • Method Detail

      • buffer

        public java.nio.Buffer buffer()
        Description copied from class: Indexer
        Returns the backing buffer, or null if none
        Overrides:
        buffer in class Indexer
      • reindex

        public UShortIndexer reindex​(Index index)
        Description copied from class: Indexer
        Returns a new Indexer using the same data, but with a different Index.
        Specified by:
        reindex in class Indexer
      • get

        public int get​(long i)
        Description copied from class: UShortIndexer
        Returns array/buffer[index(i)]
        Specified by:
        get in class UShortIndexer
      • get

        public UShortIndexer get​(long i,
                                 int[] s,
                                 int offset,
                                 int length)
        Description copied from class: UShortIndexer
        Returns this where s[offset:offset + length] = array/buffer[index(i)]
        Specified by:
        get in class UShortIndexer
      • get

        public int get​(long i,
                       long j)
        Description copied from class: UShortIndexer
        Returns array/buffer[index(i, j)]
        Specified by:
        get in class UShortIndexer
      • get

        public UShortIndexer get​(long i,
                                 long j,
                                 int[] s,
                                 int offset,
                                 int length)
        Description copied from class: UShortIndexer
        Returns this where s[offset:offset + length] = array/buffer[index(i, j)]
        Specified by:
        get in class UShortIndexer
      • get

        public int get​(long i,
                       long j,
                       long k)
        Description copied from class: UShortIndexer
        Returns array/buffer[index(i, j, k)]
        Specified by:
        get in class UShortIndexer
      • get

        public int get​(long... indices)
        Description copied from class: UShortIndexer
        Returns array/buffer[index(indices)]
        Specified by:
        get in class UShortIndexer
      • get

        public UShortIndexer get​(long[] indices,
                                 int[] s,
                                 int offset,
                                 int length)
        Description copied from class: UShortIndexer
        Returns this where s[offset:offset + length] = array/buffer[index(indices)]
        Specified by:
        get in class UShortIndexer
      • put

        public UShortIndexer put​(long i,
                                 int[] s,
                                 int offset,
                                 int length)
        Description copied from class: UShortIndexer
        Returns this where array/buffer[index(i)] = s[offset:offset + length]
        Specified by:
        put in class UShortIndexer
      • put

        public UShortIndexer put​(long i,
                                 long j,
                                 int[] s,
                                 int offset,
                                 int length)
        Description copied from class: UShortIndexer
        Returns this where array/buffer[index(i, j)] = s[offset:offset + length]
        Specified by:
        put in class UShortIndexer
      • put

        public UShortIndexer put​(long i,
                                 long j,
                                 long k,
                                 int s)
        Description copied from class: UShortIndexer
        Returns this where array/buffer[index(i, j, k)] = s
        Specified by:
        put in class UShortIndexer
      • put

        public UShortIndexer put​(long[] indices,
                                 int[] s,
                                 int offset,
                                 int length)
        Description copied from class: UShortIndexer
        Returns this where array/buffer[index(indices)] = s[offset:offset + length]
        Specified by:
        put in class UShortIndexer
      • release

        public void release()
        Description copied from class: Indexer
        Makes sure changes are reflected onto the backing memory and clears any references.
        Specified by:
        release in class Indexer