public class LongBufferIndexer extends LongIndexer
LongBuffer
.Modifier and Type | Field and Description |
---|---|
protected LongBuffer |
buffer
The backing buffer.
|
VALUE_BYTES
Constructor and Description |
---|
LongBufferIndexer(LongBuffer buffer)
Calls
LongBufferIndexer(buffer, Index.create(buffer.limit())) . |
LongBufferIndexer(LongBuffer buffer,
Index index)
Constructor to set the
buffer and Indexer.index . |
LongBufferIndexer(LongBuffer buffer,
long... sizes)
Calls
LongBufferIndexer(buffer, Index.create(sizes)) . |
LongBufferIndexer(LongBuffer buffer,
long[] sizes,
long[] strides)
Calls
LongBufferIndexer(buffer, Index.create(sizes, strides)) . |
Modifier and Type | Method and Description |
---|---|
Buffer |
buffer()
Returns the backing buffer, or
null if none |
long |
get(long... indices)
Returns
array/buffer[index(indices)] |
long |
get(long i)
Returns
array/buffer[index(i)] |
LongIndexer |
get(long[] indices,
long[] l,
int offset,
int length)
Returns
this where l[offset:offset + length] = array/buffer[index(indices)] |
long |
get(long i,
long j)
Returns
array/buffer[index(i, j)] |
LongIndexer |
get(long i,
long[] l,
int offset,
int length)
Returns
this where l[offset:offset + length] = array/buffer[index(i)] |
long |
get(long i,
long j,
long k)
Returns
array/buffer[index(i, j, k)] |
LongIndexer |
get(long i,
long j,
long[] l,
int offset,
int length)
Returns
this where l[offset:offset + length] = array/buffer[index(i, j)] |
LongIndexer |
put(long[] indices,
long l)
Returns
this where array/buffer[index(indices)] = l |
LongIndexer |
put(long[] indices,
long[] l,
int offset,
int length)
Returns
this where array/buffer[index(indices)] = l[offset:offset + length] |
LongIndexer |
put(long i,
long l)
Returns
this where array/buffer[index(i)] = l |
LongIndexer |
put(long i,
long[] l,
int offset,
int length)
Returns
this where array/buffer[index(i)] = l[offset:offset + length] |
LongIndexer |
put(long i,
long j,
long l)
Returns
this where array/buffer[index(i, j)] = l |
LongIndexer |
put(long i,
long j,
long[] l,
int offset,
int length)
Returns
this where array/buffer[index(i, j)] = l[offset:offset + length] |
LongIndexer |
put(long i,
long j,
long k,
long l)
Returns
this where array/buffer[index(i, j, k)] = l |
LongIndexer |
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 LongBuffer buffer
public LongBufferIndexer(LongBuffer buffer)
LongBufferIndexer(buffer, Index.create(buffer.limit()))
.public LongBufferIndexer(LongBuffer buffer, long... sizes)
LongBufferIndexer(buffer, Index.create(sizes))
.public LongBufferIndexer(LongBuffer buffer, long[] sizes, long[] strides)
LongBufferIndexer(buffer, Index.create(sizes, strides))
.public LongBufferIndexer(LongBuffer buffer, Index index)
buffer
and Indexer.index
.public Buffer buffer()
Indexer
null
if nonepublic LongIndexer reindex(Index index)
Indexer
public long get(long i)
LongIndexer
array/buffer[index(i)]
get
in class LongIndexer
public LongIndexer get(long i, long[] l, int offset, int length)
LongIndexer
this
where l[offset:offset + length] = array/buffer[index(i)]
get
in class LongIndexer
public long get(long i, long j)
LongIndexer
array/buffer[index(i, j)]
get
in class LongIndexer
public LongIndexer get(long i, long j, long[] l, int offset, int length)
LongIndexer
this
where l[offset:offset + length] = array/buffer[index(i, j)]
get
in class LongIndexer
public long get(long i, long j, long k)
LongIndexer
array/buffer[index(i, j, k)]
get
in class LongIndexer
public long get(long... indices)
LongIndexer
array/buffer[index(indices)]
get
in class LongIndexer
public LongIndexer get(long[] indices, long[] l, int offset, int length)
LongIndexer
this
where l[offset:offset + length] = array/buffer[index(indices)]
get
in class LongIndexer
public LongIndexer put(long i, long l)
LongIndexer
this
where array/buffer[index(i)] = l
put
in class LongIndexer
public LongIndexer put(long i, long[] l, int offset, int length)
LongIndexer
this
where array/buffer[index(i)] = l[offset:offset + length]
put
in class LongIndexer
public LongIndexer put(long i, long j, long l)
LongIndexer
this
where array/buffer[index(i, j)] = l
put
in class LongIndexer
public LongIndexer put(long i, long j, long[] l, int offset, int length)
LongIndexer
this
where array/buffer[index(i, j)] = l[offset:offset + length]
put
in class LongIndexer
public LongIndexer put(long i, long j, long k, long l)
LongIndexer
this
where array/buffer[index(i, j, k)] = l
put
in class LongIndexer
public LongIndexer put(long[] indices, long l)
LongIndexer
this
where array/buffer[index(indices)] = l
put
in class LongIndexer
public LongIndexer put(long[] indices, long[] l, int offset, int length)
LongIndexer
this
where array/buffer[index(indices)] = l[offset:offset + length]
put
in class LongIndexer
Copyright © 2024. All rights reserved.