Class BooleanIndexer

    • Field Detail

      • VALUE_BYTES

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

      • BooleanIndexer

        protected BooleanIndexer​(Index index)
      • BooleanIndexer

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

      • create

        public static BooleanIndexer create​(boolean[] array)
        Returns new BooleanArrayIndexer(array)
      • create

        public static BooleanIndexer create​(boolean[] array,
                                            Index index)
        Returns new BooleanArrayIndexer(array, index)
      • create

        public static BooleanIndexer create​(boolean[] array,
                                            long... sizes)
        Returns new BooleanArrayIndexer(array, sizes)
      • create

        public static BooleanIndexer create​(ByteBuffer buffer,
                                            long... sizes)
        Returns new BooleanBufferIndexer(buffer, sizes)
      • create

        public static BooleanIndexer create​(boolean[] array,
                                            long[] sizes,
                                            long[] strides)
        Returns new BooleanArrayIndexer(array, sizes, strides)
      • create

        public static BooleanIndexer create​(ByteBuffer buffer,
                                            long[] sizes,
                                            long[] strides)
        Returns new BooleanBufferIndexer(buffer, sizes, strides)
      • create

        public static BooleanIndexer create​(BooleanPointer pointer,
                                            long[] sizes,
                                            long[] strides)
        Returns new BooleanRawIndexer(pointer, sizes, strides)
      • create

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public abstract BooleanIndexer put​(long[] indices,
                                           boolean[] 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 BooleanIndexer 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