public class UByteArrayIndexer extends UByteIndexer
byte[]
array, treated as unsigned.Modifier and Type | Field and Description |
---|---|
protected byte[] |
array
The backing array.
|
VALUE_BYTES
Constructor and Description |
---|
UByteArrayIndexer(byte[] array)
Calls
UByteArrayIndexer(array, Index.create(array.length)) . |
UByteArrayIndexer(byte[] array,
Index index)
Constructor to set the
array and Indexer.index . |
UByteArrayIndexer(byte[] array,
long... sizes)
Calls
UByteArrayIndexer(array, Index.create(sizes)) . |
UByteArrayIndexer(byte[] array,
long[] sizes,
long[] strides)
Calls
UByteArrayIndexer(array, Index.create(sizes, strides)) . |
Modifier and Type | Method and Description |
---|---|
byte[] |
array()
Returns the backing array, or
null if none |
int |
get(long... indices)
Returns
array/buffer[index(indices)] |
int |
get(long i)
Returns
array/buffer[index(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[index(i)] |
int |
get(long i,
long j)
Returns
array/buffer[index(i, j)] |
UByteIndexer |
get(long i,
long j,
int[] b,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[index(i, j)] |
int |
get(long i,
long j,
long k)
Returns
array/buffer[index(i, j, 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[index(i)] = b |
UByteIndexer |
put(long i,
int[] b,
int offset,
int length)
Returns
this where array/buffer[index(i)] = b[offset:offset + length] |
UByteIndexer |
put(long i,
long j,
int b)
Returns
this where array/buffer[index(i, j)] = b |
UByteIndexer |
put(long i,
long j,
int[] b,
int offset,
int length)
Returns
this where array/buffer[index(i, j)] = b[offset:offset + length] |
UByteIndexer |
put(long i,
long j,
long k,
int b)
Returns
this where array/buffer[index(i, j, k)] = b |
UByteIndexer |
reindex(Index index)
Returns a new Indexer using the same data, but with a different Index.
|
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, create, create, create, create, get, get, get, getDouble, put, put, put, putDouble
public UByteArrayIndexer(byte[] array)
UByteArrayIndexer(array, Index.create(array.length))
.public UByteArrayIndexer(byte[] array, long... sizes)
UByteArrayIndexer(array, Index.create(sizes))
.public UByteArrayIndexer(byte[] array, long[] sizes, long[] strides)
UByteArrayIndexer(array, Index.create(sizes, strides))
.public UByteArrayIndexer(byte[] array, Index index)
array
and Indexer.index
.public byte[] array()
Indexer
null
if nonepublic UByteIndexer reindex(Index index)
Indexer
public int get(long i)
UByteIndexer
array/buffer[index(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[index(i)]
get
in class UByteIndexer
public int get(long i, long j)
UByteIndexer
array/buffer[index(i, 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[index(i, j)]
get
in class UByteIndexer
public int get(long i, long j, long k)
UByteIndexer
array/buffer[index(i, j, 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[index(i)] = b
put
in class UByteIndexer
public UByteIndexer put(long i, int[] b, int offset, int length)
UByteIndexer
this
where array/buffer[index(i)] = b[offset:offset + length]
put
in class UByteIndexer
public UByteIndexer put(long i, long j, int b)
UByteIndexer
this
where array/buffer[index(i, j)] = b
put
in class UByteIndexer
public UByteIndexer put(long i, long j, int[] b, int offset, int length)
UByteIndexer
this
where array/buffer[index(i, 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[index(i, j, 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 © 2024. All rights reserved.