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