public abstract class UByteIndexer extends Indexer
byte
primitive type, treated as unsigned.Modifier and Type | Field and Description |
---|---|
static int |
VALUE_BYTES
The number of bytes used to represent a byte.
|
Modifier | Constructor and Description |
---|---|
protected |
UByteIndexer(Index index) |
protected |
UByteIndexer(long[] sizes,
long[] strides) |
Modifier and Type | Method and Description |
---|---|
static UByteIndexer |
create(byte[] array)
Returns
new UByteArrayIndexer(array) |
static UByteIndexer |
create(byte[] array,
Index index)
Returns
new UByteArrayIndexer(array, index) |
static UByteIndexer |
create(byte[] array,
long... sizes)
Returns
new UByteArrayIndexer(array, sizes) |
static UByteIndexer |
create(byte[] array,
long[] sizes,
long[] strides)
Returns
new ByteArrayIndexer(array, sizes, strides) |
static UByteIndexer |
create(ByteBuffer buffer)
Returns
new UByteBufferIndexer(buffer) |
static UByteIndexer |
create(ByteBuffer buffer,
Index index)
Returns
new UByteBufferIndexer(buffer, index) |
static UByteIndexer |
create(ByteBuffer buffer,
long... sizes)
Returns
new UByteBufferIndexer(buffer, sizes) |
static UByteIndexer |
create(ByteBuffer buffer,
long[] sizes,
long[] strides)
Returns
new ByteBufferIndexer(buffer, sizes, strides) |
static UByteIndexer |
create(BytePointer pointer)
Returns
new UByteRawIndexer(pointer) |
static UByteIndexer |
create(BytePointer pointer,
Index index)
Returns
new UByteRawIndexer(pointer, index) |
static UByteIndexer |
create(BytePointer pointer,
Index index,
boolean direct)
Creates a byte indexer to access efficiently the data of a pointer.
|
static UByteIndexer |
create(BytePointer pointer,
long... sizes)
Returns
new UByteRawIndexer(pointer, index) |
static UByteIndexer |
create(BytePointer pointer,
long[] sizes,
long[] strides)
Returns
new UByteRawIndexer(pointer, sizes, strides) |
static UByteIndexer |
create(BytePointer pointer,
long[] sizes,
long[] strides,
boolean direct)
Returns
create(pointer, Index.create(sizes, strides), direct) |
abstract int |
get(long... indices)
Returns
array/buffer[index(indices)] |
abstract int |
get(long i)
Returns
array/buffer[index(i)] |
UByteIndexer |
get(long[] indices,
int[] b)
Returns
this where b = array/buffer[index(indices)] |
abstract 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)
Returns
this where b = array/buffer[index(i)] |
abstract UByteIndexer |
get(long i,
int[] b,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[index(i)] |
abstract int |
get(long i,
long j)
Returns
array/buffer[index(i, j)] |
UByteIndexer |
get(long i,
long j,
int[] b)
Returns
this where b = array/buffer[index(i, j)] |
abstract UByteIndexer |
get(long i,
long j,
int[] b,
int offset,
int length)
Returns
this where b[offset:offset + length] = array/buffer[index(i, j)] |
abstract int |
get(long i,
long j,
long k)
Returns
array/buffer[index(i, j, k)] |
double |
getDouble(long... indices)
Calls
get(int...indices) and returns the value as a double. |
UByteIndexer |
put(long[] indices,
int... b)
Returns
this where array/buffer[index(indices)] = b |
abstract UByteIndexer |
put(long[] indices,
int b)
Returns
this where array/buffer[index(indices)] = b |
abstract 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 |
abstract UByteIndexer |
put(long i,
int b)
Returns
this where array/buffer[index(i)] = b |
abstract 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 |
abstract UByteIndexer |
put(long i,
long j,
int b)
Returns
this where array/buffer[index(i, j)] = b |
abstract UByteIndexer |
put(long i,
long j,
int[] b,
int offset,
int length)
Returns
this where array/buffer[index(i, j)] = b[offset:offset + length] |
abstract UByteIndexer |
put(long i,
long j,
long k,
int b)
Returns
this where array/buffer[index(i, j, k)] = b |
UByteIndexer |
putDouble(long[] indices,
double b)
Casts value to primitive type and calls
put(long[] indices, <type> value) . |
public static final int VALUE_BYTES
protected UByteIndexer(Index index)
protected UByteIndexer(long[] sizes, long[] strides)
public static UByteIndexer create(byte[] array)
new UByteArrayIndexer(array)
public static UByteIndexer create(ByteBuffer buffer)
new UByteBufferIndexer(buffer)
public static UByteIndexer create(BytePointer pointer)
new UByteRawIndexer(pointer)
public static UByteIndexer create(byte[] array, Index index)
new UByteArrayIndexer(array, index)
public static UByteIndexer create(ByteBuffer buffer, Index index)
new UByteBufferIndexer(buffer, index)
public static UByteIndexer create(BytePointer pointer, Index index)
new UByteRawIndexer(pointer, index)
public static UByteIndexer create(byte[] array, long... sizes)
new UByteArrayIndexer(array, sizes)
public static UByteIndexer create(ByteBuffer buffer, long... sizes)
new UByteBufferIndexer(buffer, sizes)
public static UByteIndexer create(BytePointer pointer, long... sizes)
new UByteRawIndexer(pointer, index)
public static UByteIndexer create(byte[] array, long[] sizes, long[] strides)
new ByteArrayIndexer(array, sizes, strides)
public static UByteIndexer create(ByteBuffer buffer, long[] sizes, long[] strides)
new ByteBufferIndexer(buffer, sizes, strides)
public static UByteIndexer create(BytePointer pointer, long[] sizes, long[] strides)
new UByteRawIndexer(pointer, sizes, strides)
public static UByteIndexer create(BytePointer pointer, long[] sizes, long[] strides, boolean direct)
create(pointer, Index.create(sizes, strides), direct)
public static UByteIndexer create(BytePointer pointer, Index index, boolean direct)
pointer
- data to access via a buffer or to copy to an arrayindex
- to usedirect
- true
to use a direct buffer, see Indexer
for detailspublic abstract int get(long i)
array/buffer[index(i)]
public UByteIndexer get(long i, int[] b)
this
where b = array/buffer[index(i)]
public abstract UByteIndexer get(long i, int[] b, int offset, int length)
this
where b[offset:offset + length] = array/buffer[index(i)]
public abstract int get(long i, long j)
array/buffer[index(i, j)]
public UByteIndexer get(long i, long j, int[] b)
this
where b = array/buffer[index(i, j)]
public abstract UByteIndexer get(long i, long j, int[] b, int offset, int length)
this
where b[offset:offset + length] = array/buffer[index(i, j)]
public abstract int get(long i, long j, long k)
array/buffer[index(i, j, k)]
public abstract int get(long... indices)
array/buffer[index(indices)]
public UByteIndexer get(long[] indices, int[] b)
this
where b = array/buffer[index(indices)]
public abstract UByteIndexer get(long[] indices, int[] b, int offset, int length)
this
where b[offset:offset + length] = array/buffer[index(indices)]
public abstract UByteIndexer put(long i, int b)
this
where array/buffer[index(i)] = b
public UByteIndexer put(long i, int... b)
this
where array/buffer[index(i)] = b
public abstract UByteIndexer put(long i, int[] b, int offset, int length)
this
where array/buffer[index(i)] = b[offset:offset + length]
public abstract UByteIndexer put(long i, long j, int b)
this
where array/buffer[index(i, j)] = b
public UByteIndexer put(long i, long j, int... b)
this
where array/buffer[index(i, j)] = b
public abstract UByteIndexer put(long i, long j, int[] b, int offset, int length)
this
where array/buffer[index(i, j)] = b[offset:offset + length]
public abstract UByteIndexer put(long i, long j, long k, int b)
this
where array/buffer[index(i, j, k)] = b
public abstract UByteIndexer put(long[] indices, int b)
this
where array/buffer[index(indices)] = b
public UByteIndexer put(long[] indices, int... b)
this
where array/buffer[index(indices)] = b
public abstract UByteIndexer put(long[] indices, int[] b, int offset, int length)
this
where array/buffer[index(indices)] = b[offset:offset + length]
public double getDouble(long... indices)
Indexer
get(int...indices)
and returns the value as a double.public UByteIndexer putDouble(long[] indices, double b)
Indexer
put(long[] indices, <type> value)
.Copyright © 2024. All rights reserved.