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