Class FloatBufferIndexer

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class FloatBufferIndexer
    extends FloatIndexer
    An indexer for a FloatBuffer.
    • Constructor Summary

      Constructors 
      Constructor Description
      FloatBufferIndexer​(java.nio.FloatBuffer buffer)
      Calls FloatBufferIndexer(buffer, Index.create(buffer.limit())).
      FloatBufferIndexer​(java.nio.FloatBuffer buffer, long... sizes)
      Calls FloatBufferIndexer(buffer, Index.create(sizes)).
      FloatBufferIndexer​(java.nio.FloatBuffer buffer, long[] sizes, long[] strides)
      Calls FloatBufferIndexer(buffer, Index.create(sizes, strides)).
      FloatBufferIndexer​(java.nio.FloatBuffer buffer, Index index)
      Constructor to set the buffer and Indexer.index.
    • Field Detail

      • buffer

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

      • FloatBufferIndexer

        public FloatBufferIndexer​(java.nio.FloatBuffer buffer)
        Calls FloatBufferIndexer(buffer, Index.create(buffer.limit())).
      • FloatBufferIndexer

        public FloatBufferIndexer​(java.nio.FloatBuffer buffer,
                                  long... sizes)
        Calls FloatBufferIndexer(buffer, Index.create(sizes)).
      • FloatBufferIndexer

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

        public FloatBufferIndexer​(java.nio.FloatBuffer 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 FloatIndexer 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 float get​(long i)
        Description copied from class: FloatIndexer
        Returns array/buffer[index(i)]
        Specified by:
        get in class FloatIndexer
      • get

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

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

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

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

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

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

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

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

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

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

        public FloatIndexer put​(long[] indices,
                                float f)
        Description copied from class: FloatIndexer
        Returns this where array/buffer[index(indices)] = f
        Specified by:
        put in class FloatIndexer
      • put

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