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