Package org.bytedeco.javacpp.indexer
Class ShortBufferIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.ShortIndexer
-
- org.bytedeco.javacpp.indexer.ShortBufferIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class ShortBufferIndexer extends ShortIndexer
An indexer for aShortBuffer.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.nio.ShortBufferbufferThe backing buffer.-
Fields inherited from class org.bytedeco.javacpp.indexer.ShortIndexer
VALUE_BYTES
-
-
Constructor Summary
Constructors Constructor Description ShortBufferIndexer(java.nio.ShortBuffer buffer)CallsShortBufferIndexer(buffer, Index.create(buffer.limit())).ShortBufferIndexer(java.nio.ShortBuffer buffer, long... sizes)CallsShortBufferIndexer(buffer, Index.create(sizes)).ShortBufferIndexer(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)CallsShortBufferIndexer(buffer, Index.create(sizes, strides)).ShortBufferIndexer(java.nio.ShortBuffer buffer, Index index)Constructor to set thebufferandIndexer.index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.Bufferbuffer()Returns the backing buffer, ornullif noneshortget(long i)Returnsarray/buffer[index(i)]shortget(long... indices)Returnsarray/buffer[index(indices)]ShortIndexerget(long[] indices, short[] s, int offset, int length)Returnsthiswheres[offset:offset + length] = array/buffer[index(indices)]shortget(long i, long j)Returnsarray/buffer[index(i, j)]shortget(long i, long j, long k)Returnsarray/buffer[index(i, j, k)]ShortIndexerget(long i, long j, short[] s, int offset, int length)Returnsthiswheres[offset:offset + length] = array/buffer[index(i, j)]ShortIndexerget(long i, short[] s, int offset, int length)Returnsthiswheres[offset:offset + length] = array/buffer[index(i)]ShortIndexerput(long[] indices, short s)Returnsthiswherearray/buffer[index(indices)] = sShortIndexerput(long[] indices, short[] s, int offset, int length)Returnsthiswherearray/buffer[index(indices)] = s[offset:offset + length]ShortIndexerput(long i, long j, long k, short s)Returnsthiswherearray/buffer[index(i, j, k)] = sShortIndexerput(long i, long j, short s)Returnsthiswherearray/buffer[index(i, j)] = sShortIndexerput(long i, long j, short[] s, int offset, int length)Returnsthiswherearray/buffer[index(i, j)] = s[offset:offset + length]ShortIndexerput(long i, short s)Returnsthiswherearray/buffer[index(i)] = sShortIndexerput(long i, short[] s, int offset, int length)Returnsthiswherearray/buffer[index(i)] = s[offset:offset + length]ShortIndexerreindex(Index index)Returns a new Indexer using the same data, but with a different Index.voidrelease()Makes sure changes are reflected onto the backing memory and clears any references.-
Methods inherited from class org.bytedeco.javacpp.indexer.ShortIndexer
create, create, create, create, create, create, create, create, create, create, create, create, create, create, get, get, get, getDouble, put, put, put, putDouble
-
-
-
-
Constructor Detail
-
ShortBufferIndexer
public ShortBufferIndexer(java.nio.ShortBuffer buffer)
CallsShortBufferIndexer(buffer, Index.create(buffer.limit())).
-
ShortBufferIndexer
public ShortBufferIndexer(java.nio.ShortBuffer buffer, long... sizes)CallsShortBufferIndexer(buffer, Index.create(sizes)).
-
ShortBufferIndexer
public ShortBufferIndexer(java.nio.ShortBuffer buffer, long[] sizes, long[] strides)CallsShortBufferIndexer(buffer, Index.create(sizes, strides)).
-
ShortBufferIndexer
public ShortBufferIndexer(java.nio.ShortBuffer buffer, Index index)Constructor to set thebufferandIndexer.index.
-
-
Method Detail
-
buffer
public java.nio.Buffer buffer()
Description copied from class:IndexerReturns the backing buffer, ornullif none
-
reindex
public ShortIndexer reindex(Index index)
Description copied from class:IndexerReturns a new Indexer using the same data, but with a different Index.
-
get
public short get(long i)
Description copied from class:ShortIndexerReturnsarray/buffer[index(i)]- Specified by:
getin classShortIndexer
-
get
public ShortIndexer get(long i, short[] s, int offset, int length)
Description copied from class:ShortIndexerReturnsthiswheres[offset:offset + length] = array/buffer[index(i)]- Specified by:
getin classShortIndexer
-
get
public short get(long i, long j)Description copied from class:ShortIndexerReturnsarray/buffer[index(i, j)]- Specified by:
getin classShortIndexer
-
get
public ShortIndexer get(long i, long j, short[] s, int offset, int length)
Description copied from class:ShortIndexerReturnsthiswheres[offset:offset + length] = array/buffer[index(i, j)]- Specified by:
getin classShortIndexer
-
get
public short get(long i, long j, long k)Description copied from class:ShortIndexerReturnsarray/buffer[index(i, j, k)]- Specified by:
getin classShortIndexer
-
get
public short get(long... indices)
Description copied from class:ShortIndexerReturnsarray/buffer[index(indices)]- Specified by:
getin classShortIndexer
-
get
public ShortIndexer get(long[] indices, short[] s, int offset, int length)
Description copied from class:ShortIndexerReturnsthiswheres[offset:offset + length] = array/buffer[index(indices)]- Specified by:
getin classShortIndexer
-
put
public ShortIndexer put(long i, short s)
Description copied from class:ShortIndexerReturnsthiswherearray/buffer[index(i)] = s- Specified by:
putin classShortIndexer
-
put
public ShortIndexer put(long i, short[] s, int offset, int length)
Description copied from class:ShortIndexerReturnsthiswherearray/buffer[index(i)] = s[offset:offset + length]- Specified by:
putin classShortIndexer
-
put
public ShortIndexer put(long i, long j, short s)
Description copied from class:ShortIndexerReturnsthiswherearray/buffer[index(i, j)] = s- Specified by:
putin classShortIndexer
-
put
public ShortIndexer put(long i, long j, short[] s, int offset, int length)
Description copied from class:ShortIndexerReturnsthiswherearray/buffer[index(i, j)] = s[offset:offset + length]- Specified by:
putin classShortIndexer
-
put
public ShortIndexer put(long i, long j, long k, short s)
Description copied from class:ShortIndexerReturnsthiswherearray/buffer[index(i, j, k)] = s- Specified by:
putin classShortIndexer
-
put
public ShortIndexer put(long[] indices, short s)
Description copied from class:ShortIndexerReturnsthiswherearray/buffer[index(indices)] = s- Specified by:
putin classShortIndexer
-
put
public ShortIndexer put(long[] indices, short[] s, int offset, int length)
Description copied from class:ShortIndexerReturnsthiswherearray/buffer[index(indices)] = s[offset:offset + length]- Specified by:
putin classShortIndexer
-
-