Class UByteIndexer

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected UByteIndexer​(long[] sizes, long[] strides)  
      protected UByteIndexer​(Index index)  
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static UByteIndexer create​(byte[] array)
      Returns new UByteArrayIndexer(array)
      static UByteIndexer create​(byte[] array, long... sizes)
      Returns new UByteArrayIndexer(array, sizes)
      static UByteIndexer create​(byte[] array, long[] sizes, long[] strides)
      Returns new ByteArrayIndexer(array, sizes, strides)
      static UByteIndexer create​(byte[] array, Index index)
      Returns new UByteArrayIndexer(array, index)
      static UByteIndexer create​(java.nio.ByteBuffer buffer)
      Returns new UByteBufferIndexer(buffer)
      static UByteIndexer create​(java.nio.ByteBuffer buffer, long... sizes)
      Returns new UByteBufferIndexer(buffer, sizes)
      static UByteIndexer create​(java.nio.ByteBuffer buffer, long[] sizes, long[] strides)
      Returns new ByteBufferIndexer(buffer, sizes, strides)
      static UByteIndexer create​(java.nio.ByteBuffer buffer, Index index)
      Returns new UByteBufferIndexer(buffer, index)
      static UByteIndexer create​(BytePointer pointer)
      Returns new UByteRawIndexer(pointer)
      static UByteIndexer create​(BytePointer pointer, long... sizes)
      Returns new UByteRawIndexer(pointer, index)
      static UByteIndexer create​(BytePointer pointer, long[] sizes, long[] strides)
      Returns new UByteRawIndexer(pointer, sizes, strides)
      static UByteIndexer create​(BytePointer pointer, long[] sizes, long[] strides, boolean direct)
      Returns create(pointer, Index.create(sizes, strides), direct)
      static UByteIndexer create​(BytePointer pointer, Index index)
      Returns new UByteRawIndexer(pointer, index)
      static UByteIndexer create​(BytePointer pointer, Index index, boolean direct)
      Creates a byte indexer to access efficiently the data of a pointer.
      abstract int get​(long i)
      Returns array/buffer[index(i)]
      abstract int get​(long... indices)
      Returns array/buffer[index(indices)]
      UByteIndexer get​(long[] indices, int[] b)
      Returns this where b = array/buffer[index(indices)]
      abstract UByteIndexer get​(long[] indices, int[] b, int offset, int length)
      Returns this where b[offset:offset + length] = array/buffer[index(indices)]
      UByteIndexer get​(long i, int[] b)
      Returns this where b = array/buffer[index(i)]
      abstract UByteIndexer get​(long i, int[] b, int offset, int length)
      Returns this where b[offset:offset + length] = array/buffer[index(i)]
      abstract int get​(long i, long j)
      Returns array/buffer[index(i, j)]
      UByteIndexer get​(long i, long j, int[] b)
      Returns this where b = array/buffer[index(i, j)]
      abstract UByteIndexer get​(long i, long j, int[] b, int offset, int length)
      Returns this where b[offset:offset + length] = array/buffer[index(i, j)]
      abstract int get​(long i, long j, long k)
      Returns array/buffer[index(i, j, k)]
      double getDouble​(long... indices)
      Calls get(int...indices) and returns the value as a double.
      abstract UByteIndexer put​(long[] indices, int b)
      Returns this where array/buffer[index(indices)] = b
      UByteIndexer put​(long[] indices, int... b)
      Returns this where array/buffer[index(indices)] = b
      abstract UByteIndexer put​(long[] indices, int[] b, int offset, int length)
      Returns this where array/buffer[index(indices)] = b[offset:offset + length]
      abstract UByteIndexer put​(long i, int b)
      Returns this where array/buffer[index(i)] = b
      UByteIndexer put​(long i, int... b)
      Returns this where array/buffer[index(i)] = b
      abstract UByteIndexer put​(long i, int[] b, int offset, int length)
      Returns this where array/buffer[index(i)] = b[offset:offset + length]
      abstract UByteIndexer put​(long i, long j, int b)
      Returns this where array/buffer[index(i, j)] = b
      UByteIndexer put​(long i, long j, int... b)
      Returns this where array/buffer[index(i, j)] = b
      abstract UByteIndexer put​(long i, long j, int[] b, int offset, int length)
      Returns this where array/buffer[index(i, j)] = b[offset:offset + length]
      abstract UByteIndexer put​(long i, long j, long k, int b)
      Returns this where array/buffer[index(i, j, k)] = b
      UByteIndexer putDouble​(long[] indices, double b)
      Casts value to primitive type and calls put(long[] indices, <type> value).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • VALUE_BYTES

        public static final int VALUE_BYTES
        The number of bytes used to represent a byte.
        See Also:
        Constant Field Values
    • Constructor Detail

      • UByteIndexer

        protected UByteIndexer​(Index index)
      • UByteIndexer

        protected UByteIndexer​(long[] sizes,
                               long[] strides)
    • Method Detail

      • create

        public static UByteIndexer create​(byte[] array)
        Returns new UByteArrayIndexer(array)
      • create

        public static UByteIndexer create​(java.nio.ByteBuffer buffer)
        Returns new UByteBufferIndexer(buffer)
      • create

        public static UByteIndexer create​(byte[] array,
                                          Index index)
        Returns new UByteArrayIndexer(array, index)
      • create

        public static UByteIndexer create​(java.nio.ByteBuffer buffer,
                                          Index index)
        Returns new UByteBufferIndexer(buffer, index)
      • create

        public static UByteIndexer create​(byte[] array,
                                          long... sizes)
        Returns new UByteArrayIndexer(array, sizes)
      • create

        public static UByteIndexer create​(java.nio.ByteBuffer buffer,
                                          long... sizes)
        Returns new UByteBufferIndexer(buffer, sizes)
      • create

        public static UByteIndexer create​(BytePointer pointer,
                                          long... sizes)
        Returns new UByteRawIndexer(pointer, index)
      • create

        public static UByteIndexer create​(byte[] array,
                                          long[] sizes,
                                          long[] strides)
        Returns new ByteArrayIndexer(array, sizes, strides)
      • create

        public static UByteIndexer create​(java.nio.ByteBuffer buffer,
                                          long[] sizes,
                                          long[] strides)
        Returns new ByteBufferIndexer(buffer, sizes, strides)
      • create

        public static UByteIndexer create​(BytePointer pointer,
                                          long[] sizes,
                                          long[] strides)
        Returns new UByteRawIndexer(pointer, sizes, strides)
      • create

        public static UByteIndexer create​(BytePointer pointer,
                                          long[] sizes,
                                          long[] strides,
                                          boolean direct)
        Returns create(pointer, Index.create(sizes, strides), direct)
      • create

        public static UByteIndexer create​(BytePointer pointer,
                                          Index index,
                                          boolean direct)
        Creates a byte indexer to access efficiently the data of a pointer.
        Parameters:
        pointer - data to access via a buffer or to copy to an array
        index - to use
        direct - true to use a direct buffer, see Indexer for details
        Returns:
        the new byte indexer backed by the raw memory interface, a buffer, or an array
      • get

        public abstract int get​(long i)
        Returns array/buffer[index(i)]
      • get

        public UByteIndexer get​(long i,
                                int[] b)
        Returns this where b = array/buffer[index(i)]
      • get

        public abstract UByteIndexer get​(long i,
                                         int[] b,
                                         int offset,
                                         int length)
        Returns this where b[offset:offset + length] = array/buffer[index(i)]
      • get

        public abstract int get​(long i,
                                long j)
        Returns array/buffer[index(i, j)]
      • get

        public UByteIndexer get​(long i,
                                long j,
                                int[] b)
        Returns this where b = array/buffer[index(i, j)]
      • get

        public abstract UByteIndexer get​(long i,
                                         long j,
                                         int[] b,
                                         int offset,
                                         int length)
        Returns this where b[offset:offset + length] = array/buffer[index(i, j)]
      • get

        public abstract int get​(long i,
                                long j,
                                long k)
        Returns array/buffer[index(i, j, k)]
      • get

        public abstract int get​(long... indices)
        Returns array/buffer[index(indices)]
      • get

        public UByteIndexer get​(long[] indices,
                                int[] b)
        Returns this where b = array/buffer[index(indices)]
      • get

        public abstract UByteIndexer get​(long[] indices,
                                         int[] b,
                                         int offset,
                                         int length)
        Returns this where b[offset:offset + length] = array/buffer[index(indices)]
      • put

        public abstract UByteIndexer put​(long i,
                                         int b)
        Returns this where array/buffer[index(i)] = b
      • put

        public UByteIndexer put​(long i,
                                int... b)
        Returns this where array/buffer[index(i)] = b
      • put

        public abstract UByteIndexer put​(long i,
                                         int[] b,
                                         int offset,
                                         int length)
        Returns this where array/buffer[index(i)] = b[offset:offset + length]
      • put

        public abstract UByteIndexer put​(long i,
                                         long j,
                                         int b)
        Returns this where array/buffer[index(i, j)] = b
      • put

        public UByteIndexer put​(long i,
                                long j,
                                int... b)
        Returns this where array/buffer[index(i, j)] = b
      • put

        public abstract UByteIndexer put​(long i,
                                         long j,
                                         int[] b,
                                         int offset,
                                         int length)
        Returns this where array/buffer[index(i, j)] = b[offset:offset + length]
      • put

        public abstract UByteIndexer put​(long i,
                                         long j,
                                         long k,
                                         int b)
        Returns this where array/buffer[index(i, j, k)] = b
      • put

        public abstract UByteIndexer put​(long[] indices,
                                         int b)
        Returns this where array/buffer[index(indices)] = b
      • put

        public UByteIndexer put​(long[] indices,
                                int... b)
        Returns this where array/buffer[index(indices)] = b
      • put

        public abstract UByteIndexer put​(long[] indices,
                                         int[] b,
                                         int offset,
                                         int length)
        Returns this where array/buffer[index(indices)] = b[offset:offset + length]
      • getDouble

        public double getDouble​(long... indices)
        Description copied from class: Indexer
        Calls get(int...indices) and returns the value as a double.
        Specified by:
        getDouble in class Indexer
      • putDouble

        public UByteIndexer putDouble​(long[] indices,
                                      double b)
        Description copied from class: Indexer
        Casts value to primitive type and calls put(long[] indices, <type> value).
        Specified by:
        putDouble in class Indexer