Class CharIndexer

    • Constructor Summary

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

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static CharIndexer create​(char[] array)
      Returns new CharArrayIndexer(array)
      static CharIndexer create​(char[] array, long... sizes)
      Returns new CharArrayIndexer(array, sizes)
      static CharIndexer create​(char[] array, long[] sizes, long[] strides)
      Returns new CharArrayIndexer(array, sizes, strides)
      static CharIndexer create​(char[] array, Index index)
      Returns new CharArrayIndexer(array, index)
      static CharIndexer create​(java.nio.CharBuffer buffer)
      Returns new CharBufferIndexer(buffer)
      static CharIndexer create​(java.nio.CharBuffer buffer, long... sizes)
      Returns new CharBufferIndexer(buffer, sizes)
      static CharIndexer create​(java.nio.CharBuffer buffer, long[] sizes, long[] strides)
      Returns new CharBufferIndexer(buffer, sizes, strides)
      static CharIndexer create​(java.nio.CharBuffer buffer, Index index)
      Returns new CharBufferIndexer(buffer, index)
      static CharIndexer create​(CharPointer pointer)
      Returns new CharRawIndexer(pointer)
      static CharIndexer create​(CharPointer pointer, long... sizes)
      Returns new CharRawIndexer(pointer, sizes)
      static CharIndexer create​(CharPointer pointer, long[] sizes, long[] strides)
      Returns new CharRawIndexer(pointer, sizes, strides)
      static CharIndexer create​(CharPointer pointer, long[] sizes, long[] strides, boolean direct)
      Returns create(pointer, Index.create(sizes, strides), direct)
      static CharIndexer create​(CharPointer pointer, Index index)
      Returns new CharRawIndexer(pointer, index)
      static CharIndexer create​(CharPointer pointer, Index index, boolean direct)
      Creates a char indexer to access efficiently the data of a pointer.
      abstract char get​(long i)
      Returns array/buffer[index(i)]
      abstract char get​(long... indices)
      Returns array/buffer[index(indices)]
      CharIndexer get​(long[] indices, char[] c)
      Returns this where c = array/buffer[index(indices)]
      abstract CharIndexer get​(long[] indices, char[] c, int offset, int length)
      Returns this where c[offset:offset + length] = array/buffer[index(indices)]
      CharIndexer get​(long i, char[] c)
      Returns this where c = array/buffer[index(i)]
      abstract CharIndexer get​(long i, char[] c, int offset, int length)
      Returns this where c[offset:offset + length] = array/buffer[index(i)]
      abstract char get​(long i, long j)
      Returns array/buffer[index(i, j)]
      CharIndexer get​(long i, long j, char[] c)
      Returns this where c = array/buffer[index(i, j)]
      abstract CharIndexer get​(long i, long j, char[] c, int offset, int length)
      Returns this where c[offset:offset + length] = array/buffer[index(i, j)]
      abstract char 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 CharIndexer put​(long[] indices, char c)
      Returns this where array/buffer[index(indices)] = c
      CharIndexer put​(long[] indices, char... c)
      Returns this where array/buffer[index(indices)] = c
      abstract CharIndexer put​(long[] indices, char[] c, int offset, int length)
      Returns this where array/buffer[index(indices)] = c[offset:offset + length]
      abstract CharIndexer put​(long i, char c)
      Returns this where array/buffer[index(i)] = c
      CharIndexer put​(long i, char... c)
      Returns this where array/buffer[index(i)] = c
      abstract CharIndexer put​(long i, char[] c, int offset, int length)
      Returns this where array/buffer[index(i)] = c[offset:offset + length]
      abstract CharIndexer put​(long i, long j, char c)
      Returns this where array/buffer[index(i, j)] = c
      CharIndexer put​(long i, long j, char... c)
      Returns this where array/buffer[index(i, j)] = c
      abstract CharIndexer put​(long i, long j, char[] c, int offset, int length)
      Returns this where array/buffer[index(i, j)] = c[offset:offset + length]
      abstract CharIndexer put​(long i, long j, long k, char c)
      Returns this where array/buffer[index(i, j, k)] = c
      CharIndexer putDouble​(long[] indices, double c)
      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 char.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CharIndexer

        protected CharIndexer​(Index index)
      • CharIndexer

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

      • create

        public static CharIndexer create​(char[] array)
        Returns new CharArrayIndexer(array)
      • create

        public static CharIndexer create​(java.nio.CharBuffer buffer)
        Returns new CharBufferIndexer(buffer)
      • create

        public static CharIndexer create​(char[] array,
                                         Index index)
        Returns new CharArrayIndexer(array, index)
      • create

        public static CharIndexer create​(java.nio.CharBuffer buffer,
                                         Index index)
        Returns new CharBufferIndexer(buffer, index)
      • create

        public static CharIndexer create​(char[] array,
                                         long... sizes)
        Returns new CharArrayIndexer(array, sizes)
      • create

        public static CharIndexer create​(java.nio.CharBuffer buffer,
                                         long... sizes)
        Returns new CharBufferIndexer(buffer, sizes)
      • create

        public static CharIndexer create​(CharPointer pointer,
                                         long... sizes)
        Returns new CharRawIndexer(pointer, sizes)
      • create

        public static CharIndexer create​(char[] array,
                                         long[] sizes,
                                         long[] strides)
        Returns new CharArrayIndexer(array, sizes, strides)
      • create

        public static CharIndexer create​(java.nio.CharBuffer buffer,
                                         long[] sizes,
                                         long[] strides)
        Returns new CharBufferIndexer(buffer, sizes, strides)
      • create

        public static CharIndexer create​(CharPointer pointer,
                                         long[] sizes,
                                         long[] strides)
        Returns new CharRawIndexer(pointer, sizes, strides)
      • create

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

        public static CharIndexer create​(CharPointer pointer,
                                         Index index,
                                         boolean direct)
        Creates a char 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 char indexer backed by the raw memory interface, a buffer, or an array
      • get

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

        public CharIndexer get​(long i,
                               char[] c)
        Returns this where c = array/buffer[index(i)]
      • get

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

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

        public CharIndexer get​(long i,
                               long j,
                               char[] c)
        Returns this where c = array/buffer[index(i, j)]
      • get

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

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

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

        public CharIndexer get​(long[] indices,
                               char[] c)
        Returns this where c = array/buffer[index(indices)]
      • get

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

        public abstract CharIndexer put​(long i,
                                        char c)
        Returns this where array/buffer[index(i)] = c
      • put

        public CharIndexer put​(long i,
                               char... c)
        Returns this where array/buffer[index(i)] = c
      • put

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

        public abstract CharIndexer put​(long i,
                                        long j,
                                        char c)
        Returns this where array/buffer[index(i, j)] = c
      • put

        public CharIndexer put​(long i,
                               long j,
                               char... c)
        Returns this where array/buffer[index(i, j)] = c
      • put

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

        public abstract CharIndexer put​(long i,
                                        long j,
                                        long k,
                                        char c)
        Returns this where array/buffer[index(i, j, k)] = c
      • put

        public abstract CharIndexer put​(long[] indices,
                                        char c)
        Returns this where array/buffer[index(indices)] = c
      • put

        public CharIndexer put​(long[] indices,
                               char... c)
        Returns this where array/buffer[index(indices)] = c
      • put

        public abstract CharIndexer put​(long[] indices,
                                        char[] c,
                                        int offset,
                                        int length)
        Returns this where array/buffer[index(indices)] = c[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 CharIndexer putDouble​(long[] indices,
                                     double c)
        Description copied from class: Indexer
        Casts value to primitive type and calls put(long[] indices, <type> value).
        Specified by:
        putDouble in class Indexer