Package org.bytedeco.javacpp.indexer
Class ShortRawIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.ShortIndexer
-
- org.bytedeco.javacpp.indexer.ShortRawIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class ShortRawIndexer extends ShortIndexer
An indexer for aShortPointer
using theRaw
instance.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) long
base
Base address and number of elements accessible.protected ShortPointer
pointer
The backing pointer.protected static Raw
RAW
The instance for the raw memory interface.(package private) long
size
Base address and number of elements accessible.-
Fields inherited from class org.bytedeco.javacpp.indexer.ShortIndexer
VALUE_BYTES
-
-
Constructor Summary
Constructors Constructor Description ShortRawIndexer(ShortPointer pointer)
CallsShortRawIndexer(pointer, Index.create(pointer.limit() - pointer.position()))
.ShortRawIndexer(ShortPointer pointer, long... sizes)
CallsShortRawIndexer(pointer, Index.create(sizes))
.ShortRawIndexer(ShortPointer pointer, long[] sizes, long[] strides)
CallsShortRawIndexer(pointer, Index.create(sizes, strides))
.ShortRawIndexer(ShortPointer pointer, Index index)
Constructor to set thepointer
andIndexer.index
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description short
get(long i)
Returnsarray/buffer[index(i)]
short
get(long... indices)
Returnsarray/buffer[index(indices)]
ShortIndexer
get(long[] indices, short[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(indices)]
short
get(long i, long j)
Returnsarray/buffer[index(i, j)]
short
get(long i, long j, long k)
Returnsarray/buffer[index(i, j, k)]
ShortIndexer
get(long i, long j, short[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i, j)]
ShortIndexer
get(long i, short[] s, int offset, int length)
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i)]
short
getRaw(long i)
Pointer
pointer()
Returns the backing pointer, ornull
if noneShortIndexer
put(long[] indices, short s)
Returnsthis
wherearray/buffer[index(indices)] = s
ShortIndexer
put(long[] indices, short[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(indices)] = s[offset:offset + length]
ShortIndexer
put(long i, long j, long k, short s)
Returnsthis
wherearray/buffer[index(i, j, k)] = s
ShortIndexer
put(long i, long j, short s)
Returnsthis
wherearray/buffer[index(i, j)] = s
ShortIndexer
put(long i, long j, short[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(i, j)] = s[offset:offset + length]
ShortIndexer
put(long i, short s)
Returnsthis
wherearray/buffer[index(i)] = s
ShortIndexer
put(long i, short[] s, int offset, int length)
Returnsthis
wherearray/buffer[index(i)] = s[offset:offset + length]
ShortIndexer
putRaw(long i, short s)
ShortIndexer
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.ShortIndexer
create, create, create, create, create, create, create, create, create, create, create, create, create, create, get, get, get, getDouble, put, put, put, putDouble
-
-
-
-
Field Detail
-
RAW
protected static final Raw RAW
The instance for the raw memory interface.
-
pointer
protected ShortPointer pointer
The backing pointer.
-
base
final long base
Base address and number of elements accessible.
-
size
final long size
Base address and number of elements accessible.
-
-
Constructor Detail
-
ShortRawIndexer
public ShortRawIndexer(ShortPointer pointer)
CallsShortRawIndexer(pointer, Index.create(pointer.limit() - pointer.position()))
.
-
ShortRawIndexer
public ShortRawIndexer(ShortPointer pointer, long... sizes)
CallsShortRawIndexer(pointer, Index.create(sizes))
.
-
ShortRawIndexer
public ShortRawIndexer(ShortPointer pointer, long[] sizes, long[] strides)
CallsShortRawIndexer(pointer, Index.create(sizes, strides))
.
-
ShortRawIndexer
public ShortRawIndexer(ShortPointer pointer, Index index)
Constructor to set thepointer
andIndexer.index
.
-
-
Method Detail
-
pointer
public Pointer pointer()
Description copied from class:Indexer
Returns the backing pointer, ornull
if none
-
reindex
public ShortIndexer reindex(Index index)
Description copied from class:Indexer
Returns a new Indexer using the same data, but with a different Index.
-
getRaw
public short getRaw(long i)
-
get
public short get(long i)
Description copied from class:ShortIndexer
Returnsarray/buffer[index(i)]
- Specified by:
get
in classShortIndexer
-
get
public ShortIndexer get(long i, short[] s, int offset, int length)
Description copied from class:ShortIndexer
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i)]
- Specified by:
get
in classShortIndexer
-
get
public short get(long i, long j)
Description copied from class:ShortIndexer
Returnsarray/buffer[index(i, j)]
- Specified by:
get
in classShortIndexer
-
get
public ShortIndexer get(long i, long j, short[] s, int offset, int length)
Description copied from class:ShortIndexer
Returnsthis
wheres[offset:offset + length] = array/buffer[index(i, j)]
- Specified by:
get
in classShortIndexer
-
get
public short get(long i, long j, long k)
Description copied from class:ShortIndexer
Returnsarray/buffer[index(i, j, k)]
- Specified by:
get
in classShortIndexer
-
get
public short get(long... indices)
Description copied from class:ShortIndexer
Returnsarray/buffer[index(indices)]
- Specified by:
get
in classShortIndexer
-
get
public ShortIndexer get(long[] indices, short[] s, int offset, int length)
Description copied from class:ShortIndexer
Returnsthis
wheres[offset:offset + length] = array/buffer[index(indices)]
- Specified by:
get
in classShortIndexer
-
putRaw
public ShortIndexer putRaw(long i, short s)
-
put
public ShortIndexer put(long i, short s)
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i)] = s
- Specified by:
put
in classShortIndexer
-
put
public ShortIndexer put(long i, short[] s, int offset, int length)
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i)] = s[offset:offset + length]
- Specified by:
put
in classShortIndexer
-
put
public ShortIndexer put(long i, long j, short s)
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i, j)] = s
- Specified by:
put
in classShortIndexer
-
put
public ShortIndexer put(long i, long j, short[] s, int offset, int length)
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i, j)] = s[offset:offset + length]
- Specified by:
put
in classShortIndexer
-
put
public ShortIndexer put(long i, long j, long k, short s)
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i, j, k)] = s
- Specified by:
put
in classShortIndexer
-
put
public ShortIndexer put(long[] indices, short s)
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(indices)] = s
- Specified by:
put
in classShortIndexer
-
put
public ShortIndexer put(long[] indices, short[] s, int offset, int length)
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(indices)] = s[offset:offset + length]
- Specified by:
put
in classShortIndexer
-
-