public class DoubleRawIndexer extends DoubleIndexer
DoublePointer
using the Raw
instance.Modifier and Type | Field and Description |
---|---|
(package private) long |
base
Base address and number of elements accessible.
|
protected DoublePointer |
pointer
The backing pointer.
|
protected static Raw |
RAW
The instance for the raw memory interface.
|
(package private) long |
size
Base address and number of elements accessible.
|
VALUE_BYTES
indexable, ONE_STRIDE, sizes, strides
Constructor and Description |
---|
DoubleRawIndexer(DoublePointer pointer)
Calls
DoubleRawIndexer(pointer, { pointer.limit() - pointer.position() }, { 1 }) . |
DoubleRawIndexer(DoublePointer pointer,
long... sizes)
Calls
DoubleRawIndexer(pointer, sizes, strides(sizes)) . |
DoubleRawIndexer(DoublePointer pointer,
long[] sizes,
long[] strides)
|
Modifier and Type | Method and Description |
---|---|
double |
get(long... indices)
Returns
array/buffer[index(indices)] |
double |
get(long i)
Returns
array/buffer[i] |
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,
int offset,
int length)
Returns
this where d[offset:offset + length] = array/buffer[i] |
double |
get(long i,
long j)
Returns
array/buffer[i * strides[0] + j] |
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] |
double |
get(long i,
long j,
long k)
Returns
array/buffer[i * strides[0] + j * strides[1] + k] |
Pointer |
pointer()
Returns the backing pointer, or
null if none |
DoubleIndexer |
put(long[] indices,
double d)
Returns
this where array/buffer[index(indices)] = d |
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 |
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 |
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] |
DoubleIndexer |
put(long i,
long j,
long k,
double d)
Returns
this where array/buffer[i * strides[0] + j * strides[1] + k] = d |
void |
release()
Makes sure changes are reflected onto the backing memory and clears any references.
|
create, create, create, create, create, create, create, create, create, create, get, get, get, getDouble, put, put, put, putDouble
protected static final Raw RAW
protected DoublePointer pointer
final long base
final long size
public DoubleRawIndexer(DoublePointer pointer)
DoubleRawIndexer(pointer, { pointer.limit() - pointer.position() }, { 1 })
.public DoubleRawIndexer(DoublePointer pointer, long... sizes)
DoubleRawIndexer(pointer, sizes, strides(sizes))
.public DoubleRawIndexer(DoublePointer pointer, long[] sizes, long[] strides)
public Pointer pointer()
Indexer
null
if nonepublic double get(long i)
DoubleIndexer
array/buffer[i]
get
in class DoubleIndexer
public DoubleIndexer get(long i, double[] d, int offset, int length)
DoubleIndexer
this
where d[offset:offset + length] = array/buffer[i]
get
in class DoubleIndexer
public double get(long i, long j)
DoubleIndexer
array/buffer[i * strides[0] + j]
get
in class DoubleIndexer
public DoubleIndexer get(long i, long j, double[] d, int offset, int length)
DoubleIndexer
this
where d[offset:offset + length] = array/buffer[i * strides[0] + j]
get
in class DoubleIndexer
public double get(long i, long j, long k)
DoubleIndexer
array/buffer[i * strides[0] + j * strides[1] + k]
get
in class DoubleIndexer
public double get(long... indices)
DoubleIndexer
array/buffer[index(indices)]
get
in class DoubleIndexer
public DoubleIndexer get(long[] indices, double[] d, int offset, int length)
DoubleIndexer
this
where d[offset:offset + length] = array/buffer[index(indices)]
get
in class DoubleIndexer
public DoubleIndexer put(long i, double d)
DoubleIndexer
this
where array/buffer[i] = d
put
in class DoubleIndexer
public DoubleIndexer put(long i, double[] d, int offset, int length)
DoubleIndexer
this
where array/buffer[i] = d[offset:offset + length]
put
in class DoubleIndexer
public DoubleIndexer put(long i, long j, double d)
DoubleIndexer
this
where array/buffer[i * strides[0] + j] = d
put
in class DoubleIndexer
public DoubleIndexer put(long i, long j, double[] d, int offset, int length)
DoubleIndexer
this
where array/buffer[i * strides[0] + j] = d[offset:offset + length]
put
in class DoubleIndexer
public DoubleIndexer put(long i, long j, long k, double d)
DoubleIndexer
this
where array/buffer[i * strides[0] + j * strides[1] + k] = d
put
in class DoubleIndexer
public DoubleIndexer put(long[] indices, double d)
DoubleIndexer
this
where array/buffer[index(indices)] = d
put
in class DoubleIndexer
public DoubleIndexer put(long[] indices, double[] d, int offset, int length)
DoubleIndexer
this
where array/buffer[index(indices)] = d[offset:offset + length]
put
in class DoubleIndexer
Copyright © 2020. All rights reserved.