public class UShortBufferIndexer extends UShortIndexer
ShortBuffer
, treated as unsigned.Modifier and Type | Field and Description |
---|---|
protected ShortBuffer |
buffer
The backing buffer.
|
VALUE_BYTES
Constructor and Description |
---|
UShortBufferIndexer(ShortBuffer buffer)
Calls
UShortBufferIndexer(buffer, Index.create(buffer.limit())) . |
UShortBufferIndexer(ShortBuffer buffer,
Index index)
Constructor to set the
buffer and Indexer.index . |
UShortBufferIndexer(ShortBuffer buffer,
long... sizes)
Calls
UShortBufferIndexer(buffer, Index.create(sizes)) . |
UShortBufferIndexer(ShortBuffer buffer,
long[] sizes,
long[] strides)
Calls
UShortBufferIndexer(buffer, Index.create(sizes, 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[index(i)] |
UShortIndexer |
get(long[] indices,
int[] s,
int offset,
int length)
Returns
this where s[offset:offset + length] = array/buffer[index(indices)] |
UShortIndexer |
get(long i,
int[] s,
int offset,
int length)
Returns
this where s[offset:offset + length] = array/buffer[index(i)] |
int |
get(long i,
long j)
Returns
array/buffer[index(i, j)] |
UShortIndexer |
get(long i,
long j,
int[] s,
int offset,
int length)
Returns
this where s[offset:offset + length] = array/buffer[index(i, j)] |
int |
get(long i,
long j,
long k)
Returns
array/buffer[index(i, j, k)] |
UShortIndexer |
put(long[] indices,
int s)
Returns
this where array/buffer[index(indices)] = s |
UShortIndexer |
put(long[] indices,
int[] s,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = s[offset:offset + length] |
UShortIndexer |
put(long i,
int s)
Returns
this where array/buffer[index(i)] = s |
UShortIndexer |
put(long i,
int[] s,
int offset,
int length)
Returns
this where array/buffer[index(i)] = s[offset:offset + length] |
UShortIndexer |
put(long i,
long j,
int s)
Returns
this where array/buffer[index(i, j)] = s |
UShortIndexer |
put(long i,
long j,
int[] s,
int offset,
int length)
Returns
this where array/buffer[index(i, j)] = s[offset:offset + length] |
UShortIndexer |
put(long i,
long j,
long k,
int s)
Returns
this where array/buffer[index(i, j, k)] = s |
UShortIndexer |
reindex(Index index)
Returns a new Indexer using the same data, but with a different Index.
|
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, create, create, create, create, get, get, get, getDouble, put, put, put, putDouble
protected ShortBuffer buffer
public UShortBufferIndexer(ShortBuffer buffer)
UShortBufferIndexer(buffer, Index.create(buffer.limit()))
.public UShortBufferIndexer(ShortBuffer buffer, long... sizes)
UShortBufferIndexer(buffer, Index.create(sizes))
.public UShortBufferIndexer(ShortBuffer buffer, long[] sizes, long[] strides)
UShortBufferIndexer(buffer, Index.create(sizes, strides))
.public UShortBufferIndexer(ShortBuffer buffer, Index index)
buffer
and Indexer.index
.public Buffer buffer()
Indexer
null
if nonepublic UShortIndexer reindex(Index index)
Indexer
public int get(long i)
UShortIndexer
array/buffer[index(i)]
get
in class UShortIndexer
public UShortIndexer get(long i, int[] s, int offset, int length)
UShortIndexer
this
where s[offset:offset + length] = array/buffer[index(i)]
get
in class UShortIndexer
public int get(long i, long j)
UShortIndexer
array/buffer[index(i, j)]
get
in class UShortIndexer
public UShortIndexer get(long i, long j, int[] s, int offset, int length)
UShortIndexer
this
where s[offset:offset + length] = array/buffer[index(i, j)]
get
in class UShortIndexer
public int get(long i, long j, long k)
UShortIndexer
array/buffer[index(i, j, k)]
get
in class UShortIndexer
public int get(long... indices)
UShortIndexer
array/buffer[index(indices)]
get
in class UShortIndexer
public UShortIndexer get(long[] indices, int[] s, int offset, int length)
UShortIndexer
this
where s[offset:offset + length] = array/buffer[index(indices)]
get
in class UShortIndexer
public UShortIndexer put(long i, int s)
UShortIndexer
this
where array/buffer[index(i)] = s
put
in class UShortIndexer
public UShortIndexer put(long i, int[] s, int offset, int length)
UShortIndexer
this
where array/buffer[index(i)] = s[offset:offset + length]
put
in class UShortIndexer
public UShortIndexer put(long i, long j, int s)
UShortIndexer
this
where array/buffer[index(i, j)] = s
put
in class UShortIndexer
public UShortIndexer put(long i, long j, int[] s, int offset, int length)
UShortIndexer
this
where array/buffer[index(i, j)] = s[offset:offset + length]
put
in class UShortIndexer
public UShortIndexer put(long i, long j, long k, int s)
UShortIndexer
this
where array/buffer[index(i, j, k)] = s
put
in class UShortIndexer
public UShortIndexer put(long[] indices, int s)
UShortIndexer
this
where array/buffer[index(indices)] = s
put
in class UShortIndexer
public UShortIndexer put(long[] indices, int[] s, int offset, int length)
UShortIndexer
this
where array/buffer[index(indices)] = s[offset:offset + length]
put
in class UShortIndexer
Copyright © 2023. All rights reserved.