public class IntBufferIndexer extends IntIndexer
IntBuffer
.Modifier and Type | Field and Description |
---|---|
protected IntBuffer |
buffer
The backing buffer.
|
VALUE_BYTES
indexable, ONE_STRIDE, sizes, strides
Constructor and Description |
---|
IntBufferIndexer(IntBuffer buffer)
Calls
IntBufferIndexer(buffer, { buffer.limit() }, { 1 }) . |
IntBufferIndexer(IntBuffer buffer,
long... sizes)
Calls
IntBufferIndexer(buffer, sizes, strides(sizes)) . |
IntBufferIndexer(IntBuffer buffer,
long[] sizes,
long[] strides)
|
Modifier and Type | Method and Description |
---|---|
Buffer |
buffer()
Returns the backing buffer, or
null if none |
int |
get(long... indices)
Returns
array/buffer[index(indices)] |
int |
get(long i)
Returns
array/buffer[i] |
IntIndexer |
get(long[] indices,
int[] m,
int offset,
int length)
Returns
this where n[offset:offset + length] = array/buffer[index(indices)] |
IntIndexer |
get(long i,
int[] m,
int offset,
int length)
Returns
this where n[offset:offset + length] = array/buffer[i] |
int |
get(long i,
long j)
Returns
array/buffer[i * strides[0] + j] |
IntIndexer |
get(long i,
long j,
int[] m,
int offset,
int length)
Returns
this where n[offset:offset + length] = array/buffer[i * strides[0] + j] |
int |
get(long i,
long j,
long k)
Returns
array/buffer[i * strides[0] + j * strides[1] + k] |
IntIndexer |
put(long[] indices,
int n)
Returns
this where array/buffer[index(indices)] = n |
IntIndexer |
put(long[] indices,
int[] m,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = n[offset:offset + length] |
IntIndexer |
put(long i,
int n)
Returns
this where array/buffer[i] = n |
IntIndexer |
put(long i,
int[] m,
int offset,
int length)
Returns
this where array/buffer[i] = n[offset:offset + length] |
IntIndexer |
put(long i,
long j,
int n)
Returns
this where array/buffer[i * strides[0] + j] = n |
IntIndexer |
put(long i,
long j,
int[] m,
int offset,
int length)
Returns
this where array/buffer[i * strides[0] + j] = n[offset:offset + length] |
IntIndexer |
put(long i,
long j,
long k,
int n)
Returns
this where array/buffer[i * strides[0] + j * strides[1] + k] = n |
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 IntBuffer buffer
public IntBufferIndexer(IntBuffer buffer)
IntBufferIndexer(buffer, { buffer.limit() }, { 1 })
.public IntBufferIndexer(IntBuffer buffer, long... sizes)
IntBufferIndexer(buffer, sizes, strides(sizes))
.public IntBufferIndexer(IntBuffer buffer, long[] sizes, long[] strides)
public Buffer buffer()
Indexer
null
if nonepublic int get(long i)
IntIndexer
array/buffer[i]
get
in class IntIndexer
public IntIndexer get(long i, int[] m, int offset, int length)
IntIndexer
this
where n[offset:offset + length] = array/buffer[i]
get
in class IntIndexer
public int get(long i, long j)
IntIndexer
array/buffer[i * strides[0] + j]
get
in class IntIndexer
public IntIndexer get(long i, long j, int[] m, int offset, int length)
IntIndexer
this
where n[offset:offset + length] = array/buffer[i * strides[0] + j]
get
in class IntIndexer
public int get(long i, long j, long k)
IntIndexer
array/buffer[i * strides[0] + j * strides[1] + k]
get
in class IntIndexer
public int get(long... indices)
IntIndexer
array/buffer[index(indices)]
get
in class IntIndexer
public IntIndexer get(long[] indices, int[] m, int offset, int length)
IntIndexer
this
where n[offset:offset + length] = array/buffer[index(indices)]
get
in class IntIndexer
public IntIndexer put(long i, int n)
IntIndexer
this
where array/buffer[i] = n
put
in class IntIndexer
public IntIndexer put(long i, int[] m, int offset, int length)
IntIndexer
this
where array/buffer[i] = n[offset:offset + length]
put
in class IntIndexer
public IntIndexer put(long i, long j, int n)
IntIndexer
this
where array/buffer[i * strides[0] + j] = n
put
in class IntIndexer
public IntIndexer put(long i, long j, int[] m, int offset, int length)
IntIndexer
this
where array/buffer[i * strides[0] + j] = n[offset:offset + length]
put
in class IntIndexer
public IntIndexer put(long i, long j, long k, int n)
IntIndexer
this
where array/buffer[i * strides[0] + j * strides[1] + k] = n
put
in class IntIndexer
public IntIndexer put(long[] indices, int n)
IntIndexer
this
where array/buffer[index(indices)] = n
put
in class IntIndexer
public IntIndexer put(long[] indices, int[] m, int offset, int length)
IntIndexer
this
where array/buffer[index(indices)] = n[offset:offset + length]
put
in class IntIndexer
Copyright © 2020. All rights reserved.