public class DoubleBufferIndexer extends DoubleIndexer
DoubleBuffer
.Modifier and Type | Field and Description |
---|---|
protected DoubleBuffer |
buffer
The backing buffer.
|
VALUE_BYTES
indexable, ONE_STRIDE, sizes, strides
Constructor and Description |
---|
DoubleBufferIndexer(DoubleBuffer buffer)
Calls
DoubleBufferIndexer(buffer, { buffer.limit() }, { 1 }) . |
DoubleBufferIndexer(DoubleBuffer buffer,
long... sizes)
Calls
DoubleBufferIndexer(buffer, sizes, strides(sizes)) . |
DoubleBufferIndexer(DoubleBuffer buffer,
long[] sizes,
long[] strides)
|
Modifier and Type | Method and Description |
---|---|
Buffer |
buffer()
Returns the backing buffer, or
null if none |
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] |
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 DoubleBuffer buffer
public DoubleBufferIndexer(DoubleBuffer buffer)
DoubleBufferIndexer(buffer, { buffer.limit() }, { 1 })
.public DoubleBufferIndexer(DoubleBuffer buffer, long... sizes)
DoubleBufferIndexer(buffer, sizes, strides(sizes))
.public DoubleBufferIndexer(DoubleBuffer buffer, long[] sizes, long[] strides)
public Buffer buffer()
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.