public abstract class BooleanIndexer extends Indexer
boolean primitive type.| Modifier and Type | Field and Description |
|---|---|
static int |
VALUE_BYTES
The number of bytes used to represent a boolean.
|
indexable, ONE_STRIDE, sizes, strides| Modifier | Constructor and Description |
|---|---|
protected |
BooleanIndexer(long[] sizes,
long[] strides) |
| Modifier and Type | Method and Description |
|---|---|
static BooleanIndexer |
create(boolean[] array)
Returns
new BooleanArrayIndexer(array) |
static BooleanIndexer |
create(boolean[] array,
long[] sizes,
long[] strides)
Returns
new BooleanArrayIndexer(array, sizes, strides) |
static BooleanIndexer |
create(BooleanPointer pointer)
Returns
create(pointer, { pointer.limit() - pointer.position() }, { 1 }, true) |
static BooleanIndexer |
create(BooleanPointer pointer,
long[] sizes,
long[] strides)
Returns
create(pointer, sizes, strides, true) |
static BooleanIndexer |
create(BooleanPointer pointer,
long[] sizes,
long[] strides,
boolean direct)
Creates a boolean indexer to access efficiently the data of a pointer.
|
static BooleanIndexer |
create(ByteBuffer buffer)
Returns
new BooleanBufferIndexer(buffer) |
static BooleanIndexer |
create(ByteBuffer buffer,
long[] sizes,
long[] strides)
Returns
new BooleanBufferIndexer(buffer, sizes, strides) |
abstract boolean |
get(long... indices)
Returns
array/buffer[index(indices)] |
abstract boolean |
get(long i)
Returns
array/buffer[i] |
BooleanIndexer |
get(long[] indices,
boolean[] b)
Returns
this where b = array/buffer[index(indices)] |
abstract BooleanIndexer |
get(long[] indices,
boolean[] b,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[index(indices)] |
BooleanIndexer |
get(long i,
boolean[] b)
Returns
this where b = array/buffer[i] |
abstract BooleanIndexer |
get(long i,
boolean[] b,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[i] |
abstract boolean |
get(long i,
long j)
Returns
array/buffer[i * strides[0] + j] |
BooleanIndexer |
get(long i,
long j,
boolean[] b)
Returns
this where b = array/buffer[i * strides[0] + j] |
abstract BooleanIndexer |
get(long i,
long j,
boolean[] b,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[i * strides[0] + j] |
abstract boolean |
get(long i,
long j,
long k)
Returns
array/buffer[i * strides[0] + j * strides[1] + k] |
double |
getDouble(long... indices)
Calls
get(int...indices) and returns the value as a double. |
BooleanIndexer |
put(long[] indices,
boolean... b)
Returns
this where array/buffer[index(indices)] = b |
abstract BooleanIndexer |
put(long[] indices,
boolean b)
Returns
this where array/buffer[index(indices)] = b |
abstract BooleanIndexer |
put(long[] indices,
boolean[] b,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = b[offset:offset + length] |
BooleanIndexer |
put(long i,
boolean... b)
Returns
this where array/buffer[i] = b |
abstract BooleanIndexer |
put(long i,
boolean b)
Returns
this where array/buffer[i] = b |
abstract BooleanIndexer |
put(long i,
boolean[] b,
int offset,
int length)
Returns
this where array/buffer[i] = b[offset:offset + length] |
BooleanIndexer |
put(long i,
long j,
boolean... b)
Returns
this where array/buffer[i * strides[0] + j] = b |
abstract BooleanIndexer |
put(long i,
long j,
boolean b)
Returns
this where array/buffer[i * strides[0] + j] = b |
abstract BooleanIndexer |
put(long i,
long j,
boolean[] b,
int offset,
int length)
Returns
this where array/buffer[i * strides[0] + j] = b[offset:offset + length] |
abstract BooleanIndexer |
put(long i,
long j,
long k,
boolean b)
Returns
this where array/buffer[i * strides[0] + j * strides[1] + k] = b |
BooleanIndexer |
putDouble(long[] indices,
double b)
Casts value to primitive type and calls
put(long[] indices, <type> value). |
public static final int VALUE_BYTES
public static BooleanIndexer create(boolean[] array)
new BooleanArrayIndexer(array)public static BooleanIndexer create(ByteBuffer buffer)
new BooleanBufferIndexer(buffer)public static BooleanIndexer create(BooleanPointer pointer)
create(pointer, { pointer.limit() - pointer.position() }, { 1 }, true)public static BooleanIndexer create(boolean[] array, long[] sizes, long[] strides)
new BooleanArrayIndexer(array, sizes, strides)public static BooleanIndexer create(ByteBuffer buffer, long[] sizes, long[] strides)
new BooleanBufferIndexer(buffer, sizes, strides)public static BooleanIndexer create(BooleanPointer pointer, long[] sizes, long[] strides)
create(pointer, sizes, strides, true)public static BooleanIndexer create(BooleanPointer pointer, long[] sizes, long[] strides, boolean direct)
pointer - data to access via a buffer or to copy to an arraydirect - true to use a direct buffer, see Indexer for detailspublic abstract boolean get(long i)
array/buffer[i]public BooleanIndexer get(long i, boolean[] b)
this where b = array/buffer[i]public abstract BooleanIndexer get(long i, boolean[] b, int offset, int length)
this where b[offset:offset + length] = array/buffer[i]public abstract boolean get(long i,
long j)
array/buffer[i * strides[0] + j]public BooleanIndexer get(long i, long j, boolean[] b)
this where b = array/buffer[i * strides[0] + j]public abstract BooleanIndexer get(long i, long j, boolean[] b, int offset, int length)
this where b[offset:offset + length] = array/buffer[i * strides[0] + j]public abstract boolean get(long i,
long j,
long k)
array/buffer[i * strides[0] + j * strides[1] + k]public abstract boolean get(long... indices)
array/buffer[index(indices)]public BooleanIndexer get(long[] indices, boolean[] b)
this where b = array/buffer[index(indices)]public abstract BooleanIndexer get(long[] indices, boolean[] b, int offset, int length)
this where b[offset:offset + length] = array/buffer[index(indices)]public abstract BooleanIndexer put(long i, boolean b)
this where array/buffer[i] = bpublic BooleanIndexer put(long i, boolean... b)
this where array/buffer[i] = bpublic abstract BooleanIndexer put(long i, boolean[] b, int offset, int length)
this where array/buffer[i] = b[offset:offset + length]public abstract BooleanIndexer put(long i, long j, boolean b)
this where array/buffer[i * strides[0] + j] = bpublic BooleanIndexer put(long i, long j, boolean... b)
this where array/buffer[i * strides[0] + j] = bpublic abstract BooleanIndexer put(long i, long j, boolean[] b, int offset, int length)
this where array/buffer[i * strides[0] + j] = b[offset:offset + length]public abstract BooleanIndexer put(long i, long j, long k, boolean b)
this where array/buffer[i * strides[0] + j * strides[1] + k] = bpublic abstract BooleanIndexer put(long[] indices, boolean b)
this where array/buffer[index(indices)] = bpublic BooleanIndexer put(long[] indices, boolean... b)
this where array/buffer[index(indices)] = bpublic abstract BooleanIndexer put(long[] indices, boolean[] b, int offset, int length)
this where array/buffer[index(indices)] = b[offset:offset + length]public double getDouble(long... indices)
Indexerget(int...indices) and returns the value as a double.public BooleanIndexer putDouble(long[] indices, double b)
Indexerput(long[] indices, <type> value).Copyright © 2019. All rights reserved.