Package org.bytedeco.javacpp.indexer
Class UShortBufferIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.UShortIndexer
-
- org.bytedeco.javacpp.indexer.UShortBufferIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class UShortBufferIndexer extends UShortIndexer
An indexer for aShortBuffer
, treated as unsigned.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.ShortBuffer
buffer
The backing buffer.-
Fields inherited from class org.bytedeco.javacpp.indexer.UShortIndexer
VALUE_BYTES
-
-
Constructor Summary
Constructors Constructor Description UShortBufferIndexer(java.nio.ShortBuffer buffer)
CallsUShortBufferIndexer(buffer, Index.create(buffer.limit()))
.UShortBufferIndexer(java.nio.ShortBuffer buffer, long... sizes)
CallsUShortBufferIndexer(buffer, Index.create(sizes))
.UShortBufferIndexer(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)
CallsUShortBufferIndexer(buffer, Index.create(sizes, strides))
.UShortBufferIndexer(java.nio.ShortBuffer buffer, Index index)
Constructor to set thebuffer
andIndexer.index
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.Buffer
buffer()
Returns the backing buffer, ornull
if noneint
get(long i)
Returnsarray/buffer[index(i)]
int
get(long... indices)
Returnsarray/buffer[index(indices)]
UShortIndexer
get(long[] indices, int[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(indices)]
UShortIndexer
get(long i, int[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i)]
int
get(long i, long j)
Returnsarray/buffer[index(i, j)]
UShortIndexer
get(long i, long j, int[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i, j)]
int
get(long i, long j, long k)
Returnsarray/buffer[index(i, j, k)]
UShortIndexer
put(long[] indices, int s)
Returnsthis
wherearray/buffer[index(indices)] = s
UShortIndexer
put(long[] indices, int[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(indices)] = s[offset:offset + length]
UShortIndexer
put(long i, int s)
Returnsthis
wherearray/buffer[index(i)] = s
UShortIndexer
put(long i, int[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(i)] = s[offset:offset + length]
UShortIndexer
put(long i, long j, int s)
Returnsthis
wherearray/buffer[index(i, j)] = s
UShortIndexer
put(long i, long j, int[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(i, j)] = s[offset:offset + length]
UShortIndexer
put(long i, long j, long k, int s)
Returnsthis
wherearray/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.-
Methods inherited from class org.bytedeco.javacpp.indexer.UShortIndexer
create, create, create, create, create, create, create, create, create, create, create, create, create, create, get, get, get, getDouble, put, put, put, putDouble
-
-
-
-
Constructor Detail
-
UShortBufferIndexer
public UShortBufferIndexer(java.nio.ShortBuffer buffer)
CallsUShortBufferIndexer(buffer, Index.create(buffer.limit()))
.
-
UShortBufferIndexer
public UShortBufferIndexer(java.nio.ShortBuffer buffer, long... sizes)
CallsUShortBufferIndexer(buffer, Index.create(sizes))
.
-
UShortBufferIndexer
public UShortBufferIndexer(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)
CallsUShortBufferIndexer(buffer, Index.create(sizes, strides))
.
-
UShortBufferIndexer
public UShortBufferIndexer(java.nio.ShortBuffer buffer, Index index)
Constructor to set thebuffer
andIndexer.index
.
-
-
Method Detail
-
buffer
public java.nio.Buffer buffer()
Description copied from class:Indexer
Returns the backing buffer, ornull
if none
-
reindex
public UShortIndexer reindex(Index index)
Description copied from class:Indexer
Returns a new Indexer using the same data, but with a different Index.
-
get
public int get(long i)
Description copied from class:UShortIndexer
Returnsarray/buffer[index(i)]
- Specified by:
get
in classUShortIndexer
-
get
public UShortIndexer get(long i, int[] s, int offset, int length)
Description copied from class:UShortIndexer
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i)]
- Specified by:
get
in classUShortIndexer
-
get
public int get(long i, long j)
Description copied from class:UShortIndexer
Returnsarray/buffer[index(i, j)]
- Specified by:
get
in classUShortIndexer
-
get
public UShortIndexer get(long i, long j, int[] s, int offset, int length)
Description copied from class:UShortIndexer
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i, j)]
- Specified by:
get
in classUShortIndexer
-
get
public int get(long i, long j, long k)
Description copied from class:UShortIndexer
Returnsarray/buffer[index(i, j, k)]
- Specified by:
get
in classUShortIndexer
-
get
public int get(long... indices)
Description copied from class:UShortIndexer
Returnsarray/buffer[index(indices)]
- Specified by:
get
in classUShortIndexer
-
get
public UShortIndexer get(long[] indices, int[] s, int offset, int length)
Description copied from class:UShortIndexer
Returnsthis
wheres[offset:offset + length] = array/buffer[index(indices)]
- Specified by:
get
in classUShortIndexer
-
put
public UShortIndexer put(long i, int s)
Description copied from class:UShortIndexer
Returnsthis
wherearray/buffer[index(i)] = s
- Specified by:
put
in classUShortIndexer
-
put
public UShortIndexer put(long i, int[] s, int offset, int length)
Description copied from class:UShortIndexer
Returnsthis
wherearray/buffer[index(i)] = s[offset:offset + length]
- Specified by:
put
in classUShortIndexer
-
put
public UShortIndexer put(long i, long j, int s)
Description copied from class:UShortIndexer
Returnsthis
wherearray/buffer[index(i, j)] = s
- Specified by:
put
in classUShortIndexer
-
put
public UShortIndexer put(long i, long j, int[] s, int offset, int length)
Description copied from class:UShortIndexer
Returnsthis
wherearray/buffer[index(i, j)] = s[offset:offset + length]
- Specified by:
put
in classUShortIndexer
-
put
public UShortIndexer put(long i, long j, long k, int s)
Description copied from class:UShortIndexer
Returnsthis
wherearray/buffer[index(i, j, k)] = s
- Specified by:
put
in classUShortIndexer
-
put
public UShortIndexer put(long[] indices, int s)
Description copied from class:UShortIndexer
Returnsthis
wherearray/buffer[index(indices)] = s
- Specified by:
put
in classUShortIndexer
-
put
public UShortIndexer put(long[] indices, int[] s, int offset, int length)
Description copied from class:UShortIndexer
Returnsthis
wherearray/buffer[index(indices)] = s[offset:offset + length]
- Specified by:
put
in classUShortIndexer
-
-