public class UByteBufferIndexer extends UByteIndexer
ByteBuffer
, treated as unsigned.Modifier and Type | Field and Description |
---|---|
protected ByteBuffer |
buffer
The backing buffer.
|
VALUE_BYTES
indexable, ONE_STRIDE, sizes, strides
Constructor and Description |
---|
UByteBufferIndexer(ByteBuffer buffer)
Calls
UByteBufferIndexer(buffer, { buffer.limit() }, { 1 }) . |
UByteBufferIndexer(ByteBuffer buffer,
long... sizes)
Calls
UByteBufferIndexer(buffer, sizes, strides(sizes)) . |
UByteBufferIndexer(ByteBuffer buffer,
long[] sizes,
long[] strides)
|
Modifier and Type | Method and Description |
---|---|
Buffer |
buffer()
Returns the backing buffer, or
null if none |
int |
get(long... indices)
Returns
array/buffer[index(indices)] |
int |
get(long i)
Returns
array/buffer[i] |
UByteIndexer |
get(long[] indices,
int[] b,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[index(indices)] |
UByteIndexer |
get(long i,
int[] b,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[i] |
int |
get(long i,
long j)
Returns
array/buffer[i * strides[0] + j] |
UByteIndexer |
get(long i,
long j,
int[] b,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[i * strides[0] + j] |
int |
get(long i,
long j,
long k)
Returns
array/buffer[i * strides[0] + j * strides[1] + k] |
UByteIndexer |
put(long[] indices,
int b)
Returns
this where array/buffer[index(indices)] = b |
UByteIndexer |
put(long[] indices,
int[] b,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = b[offset:offset + length] |
UByteIndexer |
put(long i,
int b)
Returns
this where array/buffer[i] = b |
UByteIndexer |
put(long i,
int[] b,
int offset,
int length)
Returns
this where array/buffer[i] = b[offset:offset + length] |
UByteIndexer |
put(long i,
long j,
int b)
Returns
this where array/buffer[i * strides[0] + j] = b |
UByteIndexer |
put(long i,
long j,
int[] b,
int offset,
int length)
Returns
this where array/buffer[i * strides[0] + j] = b[offset:offset + length] |
UByteIndexer |
put(long i,
long j,
long k,
int 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 UByteBufferIndexer(ByteBuffer buffer)
UByteBufferIndexer(buffer, { buffer.limit() }, { 1 })
.public UByteBufferIndexer(ByteBuffer buffer, long... sizes)
UByteBufferIndexer(buffer, sizes, strides(sizes))
.public UByteBufferIndexer(ByteBuffer buffer, long[] sizes, long[] strides)
public Buffer buffer()
Indexer
null
if nonepublic int get(long i)
UByteIndexer
array/buffer[i]
get
in class UByteIndexer
public UByteIndexer get(long i, int[] b, int offset, int length)
UByteIndexer
this
where b[offset:offset + length] = array/buffer[i]
get
in class UByteIndexer
public int get(long i, long j)
UByteIndexer
array/buffer[i * strides[0] + j]
get
in class UByteIndexer
public UByteIndexer get(long i, long j, int[] b, int offset, int length)
UByteIndexer
this
where b[offset:offset + length] = array/buffer[i * strides[0] + j]
get
in class UByteIndexer
public int get(long i, long j, long k)
UByteIndexer
array/buffer[i * strides[0] + j * strides[1] + k]
get
in class UByteIndexer
public int get(long... indices)
UByteIndexer
array/buffer[index(indices)]
get
in class UByteIndexer
public UByteIndexer get(long[] indices, int[] b, int offset, int length)
UByteIndexer
this
where b[offset:offset + length] = array/buffer[index(indices)]
get
in class UByteIndexer
public UByteIndexer put(long i, int b)
UByteIndexer
this
where array/buffer[i] = b
put
in class UByteIndexer
public UByteIndexer put(long i, int[] b, int offset, int length)
UByteIndexer
this
where array/buffer[i] = b[offset:offset + length]
put
in class UByteIndexer
public UByteIndexer put(long i, long j, int b)
UByteIndexer
this
where array/buffer[i * strides[0] + j] = b
put
in class UByteIndexer
public UByteIndexer put(long i, long j, int[] b, int offset, int length)
UByteIndexer
this
where array/buffer[i * strides[0] + j] = b[offset:offset + length]
put
in class UByteIndexer
public UByteIndexer put(long i, long j, long k, int b)
UByteIndexer
this
where array/buffer[i * strides[0] + j * strides[1] + k] = b
put
in class UByteIndexer
public UByteIndexer put(long[] indices, int b)
UByteIndexer
this
where array/buffer[index(indices)] = b
put
in class UByteIndexer
public UByteIndexer put(long[] indices, int[] b, int offset, int length)
UByteIndexer
this
where array/buffer[index(indices)] = b[offset:offset + length]
put
in class UByteIndexer
Copyright © 2020. All rights reserved.