Class UIntArrayIndexer

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class UIntArrayIndexer
    extends UIntIndexer
    An indexer for a int[] array, treated as unsigned.
    • Constructor Summary

      Constructors 
      Constructor Description
      UIntArrayIndexer​(int[] array)
      Calls UIntArrayIndexer(array, Index.create(array.length)).
      UIntArrayIndexer​(int[] array, long... sizes)
      Calls UIntArrayIndexer(array, Index.create(sizes)).
      UIntArrayIndexer​(int[] array, long[] sizes, long[] strides)
      Calls UIntArrayIndexer(array, Index.create(sizes, strides)).
      UIntArrayIndexer​(int[] array, Index index)
      Constructor to set the array and Indexer.index.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int[] array()
      Returns the backing array, or null if none
      long get​(long i)
      Returns array/buffer[index(i)]
      long get​(long... indices)
      Returns array/buffer[index(indices)]
      UIntIndexer get​(long[] indices, long[] m, int offset, int length)
      Returns this where n[offset:offset + length] = array/buffer[index(indices)]
      long get​(long i, long j)
      Returns array/buffer[index(i, j)]
      UIntIndexer get​(long i, long[] m, int offset, int length)
      Returns this where n[offset:offset + length] = array/buffer[index(i)]
      long get​(long i, long j, long k)
      Returns array/buffer[index(i, j, k)]
      UIntIndexer get​(long i, long j, long[] m, int offset, int length)
      Returns this where n[offset:offset + length] = array/buffer[index(i, j)]
      UIntIndexer put​(long[] indices, long n)
      Returns this where array/buffer[index(indices)] = n
      UIntIndexer put​(long[] indices, long[] m, int offset, int length)
      Returns this where array/buffer[index(indices)] = n[offset:offset + length]
      UIntIndexer put​(long i, long n)
      Returns this where array/buffer[index(i)] = n
      UIntIndexer put​(long i, long[] m, int offset, int length)
      Returns this where array/buffer[index(i)] = n[offset:offset + length]
      UIntIndexer put​(long i, long j, long n)
      Returns this where array/buffer[index(i, j)] = n
      UIntIndexer put​(long i, long j, long[] m, int offset, int length)
      Returns this where array/buffer[index(i, j)] = n[offset:offset + length]
      UIntIndexer put​(long i, long j, long k, long n)
      Returns this where array/buffer[index(i, j, k)] = n
      UIntIndexer reindex​(Index index)
      Returns a new Indexer using the same data, but with a different Index.
      void release()
      Makes sure changes are reflected onto the backing memory and clears any references.
      • Methods inherited from class java.lang.Object

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

      • array

        protected int[] array
        The backing array.
    • Constructor Detail

      • UIntArrayIndexer

        public UIntArrayIndexer​(int[] array)
        Calls UIntArrayIndexer(array, Index.create(array.length)).
      • UIntArrayIndexer

        public UIntArrayIndexer​(int[] array,
                                long... sizes)
        Calls UIntArrayIndexer(array, Index.create(sizes)).
      • UIntArrayIndexer

        public UIntArrayIndexer​(int[] array,
                                long[] sizes,
                                long[] strides)
        Calls UIntArrayIndexer(array, Index.create(sizes, strides)).
      • UIntArrayIndexer

        public UIntArrayIndexer​(int[] array,
                                Index index)
        Constructor to set the array and Indexer.index.
    • Method Detail

      • array

        public int[] array()
        Description copied from class: Indexer
        Returns the backing array, or null if none
        Overrides:
        array in class Indexer
      • reindex

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

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

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

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

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

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

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

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

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

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

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

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

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

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