public class BooleanBufferIndexer extends BooleanIndexer
ByteBuffer
as boolean
values.Modifier and Type | Field and Description |
---|---|
protected ByteBuffer |
buffer
The backing buffer.
|
VALUE_BYTES
indexable, ONE_STRIDE, sizes, strides
Constructor and Description |
---|
BooleanBufferIndexer(ByteBuffer buffer)
Calls
BooleanBufferIndexer(buffer, { buffer.limit() }, { 1 }) . |
BooleanBufferIndexer(ByteBuffer buffer,
long... sizes)
Calls
BooleanBufferIndexer(buffer, sizes, strides(sizes)) . |
BooleanBufferIndexer(ByteBuffer buffer,
long[] sizes,
long[] strides)
|
Modifier and Type | Method and Description |
---|---|
Buffer |
buffer()
Returns the backing buffer, or
null if none |
boolean |
get(long... indices)
Returns
array/buffer[index(indices)] |
boolean |
get(long i)
Returns
array/buffer[i] |
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,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[i] |
boolean |
get(long i,
long j)
Returns
array/buffer[i * strides[0] + j] |
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] |
boolean |
get(long i,
long j,
long k)
Returns
array/buffer[i * strides[0] + j * strides[1] + k] |
BooleanIndexer |
put(long[] indices,
boolean b)
Returns
this where array/buffer[index(indices)] = b |
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 |
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 |
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] |
BooleanIndexer |
put(long i,
long j,
long k,
boolean b)
Returns
this where array/buffer[i * strides[0] + j * strides[1] + k] = b |
void |
release()
Makes sure changes are reflected onto the backing memory and clears any references.
|
create, create, create, create, create, create, create, create, create, create, get, get, get, getDouble, put, put, put, putDouble
protected ByteBuffer buffer
public BooleanBufferIndexer(ByteBuffer buffer)
BooleanBufferIndexer(buffer, { buffer.limit() }, { 1 })
.public BooleanBufferIndexer(ByteBuffer buffer, long... sizes)
BooleanBufferIndexer(buffer, sizes, strides(sizes))
.public BooleanBufferIndexer(ByteBuffer buffer, long[] sizes, long[] strides)
public Buffer buffer()
Indexer
null
if nonepublic boolean get(long i)
BooleanIndexer
array/buffer[i]
get
in class BooleanIndexer
public BooleanIndexer get(long i, boolean[] b, int offset, int length)
BooleanIndexer
this
where b[offset:offset + length] = array/buffer[i]
get
in class BooleanIndexer
public boolean get(long i, long j)
BooleanIndexer
array/buffer[i * strides[0] + j]
get
in class BooleanIndexer
public BooleanIndexer get(long i, long j, boolean[] b, int offset, int length)
BooleanIndexer
this
where b[offset:offset + length] = array/buffer[i * strides[0] + j]
get
in class BooleanIndexer
public boolean get(long i, long j, long k)
BooleanIndexer
array/buffer[i * strides[0] + j * strides[1] + k]
get
in class BooleanIndexer
public boolean get(long... indices)
BooleanIndexer
array/buffer[index(indices)]
get
in class BooleanIndexer
public BooleanIndexer get(long[] indices, boolean[] b, int offset, int length)
BooleanIndexer
this
where b[offset:offset + length] = array/buffer[index(indices)]
get
in class BooleanIndexer
public BooleanIndexer put(long i, boolean b)
BooleanIndexer
this
where array/buffer[i] = b
put
in class BooleanIndexer
public BooleanIndexer put(long i, boolean[] b, int offset, int length)
BooleanIndexer
this
where array/buffer[i] = b[offset:offset + length]
put
in class BooleanIndexer
public BooleanIndexer put(long i, long j, boolean b)
BooleanIndexer
this
where array/buffer[i * strides[0] + j] = b
put
in class BooleanIndexer
public BooleanIndexer put(long i, long j, boolean[] b, int offset, int length)
BooleanIndexer
this
where array/buffer[i * strides[0] + j] = b[offset:offset + length]
put
in class BooleanIndexer
public BooleanIndexer put(long i, long j, long k, boolean b)
BooleanIndexer
this
where array/buffer[i * strides[0] + j * strides[1] + k] = b
put
in class BooleanIndexer
public BooleanIndexer put(long[] indices, boolean b)
BooleanIndexer
this
where array/buffer[index(indices)] = b
put
in class BooleanIndexer
public BooleanIndexer put(long[] indices, boolean[] b, int offset, int length)
BooleanIndexer
this
where array/buffer[index(indices)] = b[offset:offset + length]
put
in class BooleanIndexer
Copyright © 2020. All rights reserved.