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