public abstract class UIntIndexer extends Indexer
int
primitive type, treated as unsigned.Modifier and Type | Field and Description |
---|---|
static int |
VALUE_BYTES
The number of bytes used to represent an int.
|
indexable, ONE_STRIDE, sizes, strides
Modifier | Constructor and Description |
---|---|
protected |
UIntIndexer(long[] sizes,
long[] strides) |
Modifier and Type | Method and Description |
---|---|
static UIntIndexer |
create(int[] array)
Returns
new UIntArrayIndexer(array) |
static UIntIndexer |
create(int[] array,
long... sizes)
Returns
new UIntArrayIndexer(array, sizes) |
static UIntIndexer |
create(int[] array,
long[] sizes,
long[] strides)
Returns
new UIntArrayIndexer(array, sizes, strides) |
static UIntIndexer |
create(IntBuffer buffer)
Returns
new UIntBufferIndexer(buffer) |
static UIntIndexer |
create(IntBuffer buffer,
long... sizes)
Returns
new UIntBufferIndexer(buffer, sizes) |
static UIntIndexer |
create(IntBuffer buffer,
long[] sizes,
long[] strides)
Returns
new UIntBufferIndexer(buffer, sizes, strides) |
static UIntIndexer |
create(IntPointer pointer)
Returns
create(pointer, { pointer.limit() - pointer.position() }, { 1 }, true) |
static UIntIndexer |
create(IntPointer pointer,
long... sizes)
Returns
create(pointer, sizes, strides(sizes)) |
static UIntIndexer |
create(IntPointer pointer,
long[] sizes,
long[] strides)
Returns
create(pointer, sizes, strides, true) |
static UIntIndexer |
create(IntPointer pointer,
long[] sizes,
long[] strides,
boolean direct)
Creates a int indexer to access efficiently the data of a pointer.
|
abstract long |
get(long... indices)
Returns
array/buffer[index(indices)] |
abstract long |
get(long i)
Returns
array/buffer[i] |
UIntIndexer |
get(long[] indices,
long[] n)
Returns
this where n = array/buffer[index(indices)] |
abstract UIntIndexer |
get(long[] indices,
long[] n,
int offset,
int length)
Returns
this where n[offset:offset + length] = array/buffer[index(indices)] |
abstract long |
get(long i,
long j)
Returns
array/buffer[i * strides[0] + j] |
UIntIndexer |
get(long i,
long[] n)
Returns
this where n = array/buffer[i] |
abstract UIntIndexer |
get(long i,
long[] n,
int offset,
int length)
Returns
this where n[offset:offset + length] = array/buffer[i] |
abstract long |
get(long i,
long j,
long k)
Returns
array/buffer[i * strides[0] + j * strides[1] + k] |
UIntIndexer |
get(long i,
long j,
long[] n)
Returns
this where n = array/buffer[i * strides[0] + j] |
abstract UIntIndexer |
get(long i,
long j,
long[] n,
int offset,
int length)
Returns
this where n[offset:offset + length] = array/buffer[i * strides[0] + j] |
double |
getDouble(long... indices)
Calls
get(int...indices) and returns the value as a double. |
UIntIndexer |
put(long[] indices,
long... n)
Returns
this where array/buffer[index(indices)] = n |
abstract UIntIndexer |
put(long[] indices,
long n)
Returns
this where array/buffer[index(indices)] = n |
abstract UIntIndexer |
put(long[] indices,
long[] n,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = n[offset:offset + length] |
UIntIndexer |
put(long i,
long... n)
Returns
this where array/buffer[i] = n |
abstract UIntIndexer |
put(long i,
long n)
Returns
this where array/buffer[i] = n |
abstract UIntIndexer |
put(long i,
long[] n,
int offset,
int length)
Returns
this where array/buffer[i] = n[offset:offset + length] |
UIntIndexer |
put(long i,
long j,
long... n)
Returns
this where array/buffer[i * strides[0] + j] = n |
abstract UIntIndexer |
put(long i,
long j,
long n)
Returns
this where array/buffer[i * strides[0] + j] = n |
abstract UIntIndexer |
put(long i,
long j,
long[] n,
int offset,
int length)
Returns
this where array/buffer[i * strides[0] + j] = n[offset:offset + length] |
abstract UIntIndexer |
put(long i,
long j,
long k,
long n)
Returns
this where array/buffer[i * strides[0] + j * strides[1] + k] = n |
UIntIndexer |
putDouble(long[] indices,
double n)
Casts value to primitive type and calls
put(long[] indices, <type> value) . |
public static final int VALUE_BYTES
public static UIntIndexer create(int[] array)
new UIntArrayIndexer(array)
public static UIntIndexer create(IntBuffer buffer)
new UIntBufferIndexer(buffer)
public static UIntIndexer create(IntPointer pointer)
create(pointer, { pointer.limit() - pointer.position() }, { 1 }, true)
public static UIntIndexer create(int[] array, long... sizes)
new UIntArrayIndexer(array, sizes)
public static UIntIndexer create(IntBuffer buffer, long... sizes)
new UIntBufferIndexer(buffer, sizes)
public static UIntIndexer create(IntPointer pointer, long... sizes)
create(pointer, sizes, strides(sizes))
public static UIntIndexer create(int[] array, long[] sizes, long[] strides)
new UIntArrayIndexer(array, sizes, strides)
public static UIntIndexer create(IntBuffer buffer, long[] sizes, long[] strides)
new UIntBufferIndexer(buffer, sizes, strides)
public static UIntIndexer create(IntPointer pointer, long[] sizes, long[] strides)
create(pointer, sizes, strides, true)
public static UIntIndexer create(IntPointer 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 long get(long i)
array/buffer[i]
public UIntIndexer get(long i, long[] n)
this
where n = array/buffer[i]
public abstract UIntIndexer get(long i, long[] n, int offset, int length)
this
where n[offset:offset + length] = array/buffer[i]
public abstract long get(long i, long j)
array/buffer[i * strides[0] + j]
public UIntIndexer get(long i, long j, long[] n)
this
where n = array/buffer[i * strides[0] + j]
public abstract UIntIndexer get(long i, long j, long[] n, int offset, int length)
this
where n[offset:offset + length] = array/buffer[i * strides[0] + j]
public abstract long get(long i, long j, long k)
array/buffer[i * strides[0] + j * strides[1] + k]
public abstract long get(long... indices)
array/buffer[index(indices)]
public UIntIndexer get(long[] indices, long[] n)
this
where n = array/buffer[index(indices)]
public abstract UIntIndexer get(long[] indices, long[] n, int offset, int length)
this
where n[offset:offset + length] = array/buffer[index(indices)]
public abstract UIntIndexer put(long i, long n)
this
where array/buffer[i] = n
public UIntIndexer put(long i, long... n)
this
where array/buffer[i] = n
public abstract UIntIndexer put(long i, long[] n, int offset, int length)
this
where array/buffer[i] = n[offset:offset + length]
public abstract UIntIndexer put(long i, long j, long n)
this
where array/buffer[i * strides[0] + j] = n
public UIntIndexer put(long i, long j, long... n)
this
where array/buffer[i * strides[0] + j] = n
public abstract UIntIndexer put(long i, long j, long[] n, int offset, int length)
this
where array/buffer[i * strides[0] + j] = n[offset:offset + length]
public abstract UIntIndexer put(long i, long j, long k, long n)
this
where array/buffer[i * strides[0] + j * strides[1] + k] = n
public abstract UIntIndexer put(long[] indices, long n)
this
where array/buffer[index(indices)] = n
public UIntIndexer put(long[] indices, long... n)
this
where array/buffer[index(indices)] = n
public abstract UIntIndexer put(long[] indices, long[] n, int offset, int length)
this
where array/buffer[index(indices)] = n[offset:offset + length]
public double getDouble(long... indices)
Indexer
get(int...indices)
and returns the value as a double.public UIntIndexer putDouble(long[] indices, double n)
Indexer
put(long[] indices, <type> value)
.Copyright © 2020. All rights reserved.