Class ShortBufferIndexer

All Implemented Interfaces:
AutoCloseable

public class ShortBufferIndexer extends ShortIndexer
An indexer for a ShortBuffer.
  • Field Details

    • buffer

      protected ShortBuffer buffer
      The backing buffer.
  • Constructor Details

    • ShortBufferIndexer

      public ShortBufferIndexer(ShortBuffer buffer)
      Calls ShortBufferIndexer(buffer, Index.create(buffer.limit())).
    • ShortBufferIndexer

      public ShortBufferIndexer(ShortBuffer buffer, long... sizes)
      Calls ShortBufferIndexer(buffer, Index.create(sizes)).
    • ShortBufferIndexer

      public ShortBufferIndexer(ShortBuffer buffer, long[] sizes, long[] strides)
      Calls ShortBufferIndexer(buffer, Index.create(sizes, strides)).
    • ShortBufferIndexer

      public ShortBufferIndexer(ShortBuffer buffer, Index index)
      Constructor to set the buffer and Indexer.index.
  • Method Details

    • buffer

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

      public ShortIndexer 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 short get(long i)
      Description copied from class: ShortIndexer
      Returns array/buffer[index(i)]
      Specified by:
      get in class ShortIndexer
    • get

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

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

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

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

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

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

      public ShortIndexer put(long i, short s)
      Description copied from class: ShortIndexer
      Returns this where array/buffer[index(i)] = s
      Specified by:
      put in class ShortIndexer
    • put

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

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

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

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

      public ShortIndexer put(long[] indices, short s)
      Description copied from class: ShortIndexer
      Returns this where array/buffer[index(indices)] = s
      Specified by:
      put in class ShortIndexer
    • put

      public ShortIndexer put(long[] indices, short[] s, int offset, int length)
      Description copied from class: ShortIndexer
      Returns this where array/buffer[index(indices)] = s[offset:offset + length]
      Specified by:
      put in class ShortIndexer
    • 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