Package org.bytedeco.javacpp.indexer
Class IntArrayIndexer
java.lang.Object
org.bytedeco.javacpp.indexer.Indexer
org.bytedeco.javacpp.indexer.IntIndexer
org.bytedeco.javacpp.indexer.IntArrayIndexer
- All Implemented Interfaces:
AutoCloseable
An indexer for an
int[]
array.-
Field Summary
FieldsFields inherited from class org.bytedeco.javacpp.indexer.IntIndexer
VALUE_BYTES
-
Constructor Summary
ConstructorsConstructorDescriptionIntArrayIndexer
(int[] array) CallsIntArrayIndexer(array, Index.create(array.length))
.IntArrayIndexer
(int[] array, long... sizes) CallsIntArrayIndexer(array, Index.create(sizes))
.IntArrayIndexer
(int[] array, long[] sizes, long[] strides) CallsIntArrayIndexer(array, Index.create(sizes, strides))
.IntArrayIndexer
(int[] array, Index index) Constructor to set thearray
andIndexer.index
. -
Method Summary
Modifier and TypeMethodDescriptionint[]
array()
Returns the backing array, ornull
if noneint
get
(long i) Returnsarray/buffer[index(i)]
int
get
(long... indices) Returnsarray/buffer[index(indices)]
get
(long[] indices, int[] m, int offset, int length) Returnsthis
wheren[offset:offset + length] = array/buffer[index(indices)]
get
(long i, int[] m, int offset, int length) Returnsthis
wheren[offset:offset + length] = array/buffer[index(i)]
int
get
(long i, long j) Returnsarray/buffer[index(i, j)]
get
(long i, long j, int[] m, int offset, int length) Returnsthis
wheren[offset:offset + length] = array/buffer[index(i, j)]
int
get
(long i, long j, long k) Returnsarray/buffer[index(i, j, k)]
put
(long[] indices, int n) Returnsthis
wherearray/buffer[index(indices)] = n
put
(long[] indices, int[] m, int offset, int length) Returnsthis
wherearray/buffer[index(indices)] = n[offset:offset + length]
put
(long i, int n) Returnsthis
wherearray/buffer[index(i)] = n
put
(long i, int[] m, int offset, int length) Returnsthis
wherearray/buffer[index(i)] = n[offset:offset + length]
put
(long i, long j, int n) Returnsthis
wherearray/buffer[index(i, j)] = n
put
(long i, long j, int[] m, int offset, int length) Returnsthis
wherearray/buffer[index(i, j)] = n[offset:offset + length]
put
(long i, long j, long k, int n) Returnsthis
wherearray/buffer[index(i, j, k)] = n
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.IntIndexer
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 int[] arrayThe backing array.
-
-
Constructor Details
-
IntArrayIndexer
public IntArrayIndexer(int[] array) CallsIntArrayIndexer(array, Index.create(array.length))
. -
IntArrayIndexer
public IntArrayIndexer(int[] array, long... sizes) CallsIntArrayIndexer(array, Index.create(sizes))
. -
IntArrayIndexer
public IntArrayIndexer(int[] array, long[] sizes, long[] strides) CallsIntArrayIndexer(array, Index.create(sizes, strides))
. -
IntArrayIndexer
Constructor to set thearray
andIndexer.index
.
-
-
Method Details
-
array
public int[] 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 int get(long i) Description copied from class:IntIndexer
Returnsarray/buffer[index(i)]
- Specified by:
get
in classIntIndexer
-
get
Description copied from class:IntIndexer
Returnsthis
wheren[offset:offset + length] = array/buffer[index(i)]
- Specified by:
get
in classIntIndexer
-
get
public int get(long i, long j) Description copied from class:IntIndexer
Returnsarray/buffer[index(i, j)]
- Specified by:
get
in classIntIndexer
-
get
Description copied from class:IntIndexer
Returnsthis
wheren[offset:offset + length] = array/buffer[index(i, j)]
- Specified by:
get
in classIntIndexer
-
get
public int get(long i, long j, long k) Description copied from class:IntIndexer
Returnsarray/buffer[index(i, j, k)]
- Specified by:
get
in classIntIndexer
-
get
public int get(long... indices) Description copied from class:IntIndexer
Returnsarray/buffer[index(indices)]
- Specified by:
get
in classIntIndexer
-
get
Description copied from class:IntIndexer
Returnsthis
wheren[offset:offset + length] = array/buffer[index(indices)]
- Specified by:
get
in classIntIndexer
-
put
Description copied from class:IntIndexer
Returnsthis
wherearray/buffer[index(i)] = n
- Specified by:
put
in classIntIndexer
-
put
Description copied from class:IntIndexer
Returnsthis
wherearray/buffer[index(i)] = n[offset:offset + length]
- Specified by:
put
in classIntIndexer
-
put
Description copied from class:IntIndexer
Returnsthis
wherearray/buffer[index(i, j)] = n
- Specified by:
put
in classIntIndexer
-
put
Description copied from class:IntIndexer
Returnsthis
wherearray/buffer[index(i, j)] = n[offset:offset + length]
- Specified by:
put
in classIntIndexer
-
put
Description copied from class:IntIndexer
Returnsthis
wherearray/buffer[index(i, j, k)] = n
- Specified by:
put
in classIntIndexer
-
put
Description copied from class:IntIndexer
Returnsthis
wherearray/buffer[index(indices)] = n
- Specified by:
put
in classIntIndexer
-
put
Description copied from class:IntIndexer
Returnsthis
wherearray/buffer[index(indices)] = n[offset:offset + length]
- Specified by:
put
in classIntIndexer
-
release
public void release()Description copied from class:Indexer
Makes sure changes are reflected onto the backing memory and clears any references.
-