Package org.bytedeco.javacpp.indexer
Class ShortArrayIndexer
java.lang.Object
org.bytedeco.javacpp.indexer.Indexer
org.bytedeco.javacpp.indexer.ShortIndexer
org.bytedeco.javacpp.indexer.ShortArrayIndexer
- All Implemented Interfaces:
AutoCloseable
An indexer for a
short[]
array.-
Field Summary
FieldsFields inherited from class org.bytedeco.javacpp.indexer.ShortIndexer
VALUE_BYTES
-
Constructor Summary
ConstructorsConstructorDescriptionShortArrayIndexer
(short[] array) CallsShortArrayIndexer(array, Index.create(array.length))
.ShortArrayIndexer
(short[] array, long... sizes) CallsShortArrayIndexer(array, Index.create(sizes))
.ShortArrayIndexer
(short[] array, long[] sizes, long[] strides) CallsShortArrayIndexer(array, Index.create(sizes, strides))
.ShortArrayIndexer
(short[] array, Index index) Constructor to set thearray
andIndexer.index
. -
Method Summary
Modifier and TypeMethodDescriptionshort[]
array()
Returns the backing array, ornull
if noneshort
get
(long i) Returnsarray/buffer[index(i)]
short
get
(long... indices) Returnsarray/buffer[index(indices)]
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)]
get
(long i, long j, short[] s, int offset, int length) Returnsthis
wheres[offset:offset + length] = array/buffer[index(i, j)]
get
(long i, short[] s, int offset, int length) Returnsthis
wheres[offset:offset + length] = array/buffer[index(i)]
put
(long[] indices, short s) Returnsthis
wherearray/buffer[index(indices)] = s
put
(long[] indices, short[] s, int offset, int length) Returnsthis
wherearray/buffer[index(indices)] = s[offset:offset + length]
put
(long i, long j, long k, short s) Returnsthis
wherearray/buffer[index(i, j, k)] = s
put
(long i, long j, short s) Returnsthis
wherearray/buffer[index(i, j)] = s
put
(long i, long j, short[] s, int offset, int length) Returnsthis
wherearray/buffer[index(i, j)] = s[offset:offset + length]
put
(long i, short s) Returnsthis
wherearray/buffer[index(i)] = s
put
(long i, short[] s, int offset, int length) Returnsthis
wherearray/buffer[index(i)] = s[offset:offset + length]
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 Details
-
array
protected short[] arrayThe backing array.
-
-
Constructor Details
-
ShortArrayIndexer
public ShortArrayIndexer(short[] array) CallsShortArrayIndexer(array, Index.create(array.length))
. -
ShortArrayIndexer
public ShortArrayIndexer(short[] array, long... sizes) CallsShortArrayIndexer(array, Index.create(sizes))
. -
ShortArrayIndexer
public ShortArrayIndexer(short[] array, long[] sizes, long[] strides) CallsShortArrayIndexer(array, Index.create(sizes, strides))
. -
ShortArrayIndexer
Constructor to set thearray
andIndexer.index
.
-
-
Method Details
-
array
public short[] array()Description copied from class:Indexer
Returns the backing array, ornull
if none -
reindex
Description copied from class:Indexer
Returns a new Indexer using the same data, but with a different Index. -
get
public short get(long i) Description copied from class:ShortIndexer
Returnsarray/buffer[index(i)]
- Specified by:
get
in classShortIndexer
-
get
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
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
Description copied from class:ShortIndexer
Returnsthis
wheres[offset:offset + length] = array/buffer[index(indices)]
- Specified by:
get
in classShortIndexer
-
put
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i)] = s
- Specified by:
put
in classShortIndexer
-
put
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i)] = s[offset:offset + length]
- Specified by:
put
in classShortIndexer
-
put
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i, j)] = s
- Specified by:
put
in classShortIndexer
-
put
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i, j)] = s[offset:offset + length]
- Specified by:
put
in classShortIndexer
-
put
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(i, j, k)] = s
- Specified by:
put
in classShortIndexer
-
put
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(indices)] = s
- Specified by:
put
in classShortIndexer
-
put
Description copied from class:ShortIndexer
Returnsthis
wherearray/buffer[index(indices)] = s[offset:offset + length]
- Specified by:
put
in classShortIndexer
-
release
public void release()Description copied from class:Indexer
Makes sure changes are reflected onto the backing memory and clears any references.
-