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 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 thearrayandIndexer.index. -
Method Summary
Modifier and TypeMethodDescriptionint[]array()Returns the backing array, ornullif noneintget(long i) Returnsarray/buffer[index(i)]intget(long... indices) Returnsarray/buffer[index(indices)]get(long[] indices, int[] m, int offset, int length) Returnsthiswheren[offset:offset + length] = array/buffer[index(indices)]get(long i, int[] m, int offset, int length) Returnsthiswheren[offset:offset + length] = array/buffer[index(i)]intget(long i, long j) Returnsarray/buffer[index(i, j)]get(long i, long j, int[] m, int offset, int length) Returnsthiswheren[offset:offset + length] = array/buffer[index(i, j)]intget(long i, long j, long k) Returnsarray/buffer[index(i, j, k)]put(long[] indices, int n) Returnsthiswherearray/buffer[index(indices)] = nput(long[] indices, int[] m, int offset, int length) Returnsthiswherearray/buffer[index(indices)] = n[offset:offset + length]put(long i, int n) Returnsthiswherearray/buffer[index(i)] = nput(long i, int[] m, int offset, int length) Returnsthiswherearray/buffer[index(i)] = n[offset:offset + length]put(long i, long j, int n) Returnsthiswherearray/buffer[index(i, j)] = nput(long i, long j, int[] m, int offset, int length) Returnsthiswherearray/buffer[index(i, j)] = n[offset:offset + length]put(long i, long j, long k, int n) Returnsthiswherearray/buffer[index(i, j, k)] = nReturns 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 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 thearrayandIndexer.index.
-
-
Method Details
-
array
-
reindex
Description copied from class:IndexerReturns a new Indexer using the same data, but with a different Index. -
get
public int get(long i) Description copied from class:IntIndexerReturnsarray/buffer[index(i)]- Specified by:
getin classIntIndexer
-
get
Description copied from class:IntIndexerReturnsthiswheren[offset:offset + length] = array/buffer[index(i)]- Specified by:
getin classIntIndexer
-
get
public int get(long i, long j) Description copied from class:IntIndexerReturnsarray/buffer[index(i, j)]- Specified by:
getin classIntIndexer
-
get
Description copied from class:IntIndexerReturnsthiswheren[offset:offset + length] = array/buffer[index(i, j)]- Specified by:
getin classIntIndexer
-
get
public int get(long i, long j, long k) Description copied from class:IntIndexerReturnsarray/buffer[index(i, j, k)]- Specified by:
getin classIntIndexer
-
get
public int get(long... indices) Description copied from class:IntIndexerReturnsarray/buffer[index(indices)]- Specified by:
getin classIntIndexer
-
get
Description copied from class:IntIndexerReturnsthiswheren[offset:offset + length] = array/buffer[index(indices)]- Specified by:
getin classIntIndexer
-
put
Description copied from class:IntIndexerReturnsthiswherearray/buffer[index(i)] = n- Specified by:
putin classIntIndexer
-
put
Description copied from class:IntIndexerReturnsthiswherearray/buffer[index(i)] = n[offset:offset + length]- Specified by:
putin classIntIndexer
-
put
Description copied from class:IntIndexerReturnsthiswherearray/buffer[index(i, j)] = n- Specified by:
putin classIntIndexer
-
put
Description copied from class:IntIndexerReturnsthiswherearray/buffer[index(i, j)] = n[offset:offset + length]- Specified by:
putin classIntIndexer
-
put
Description copied from class:IntIndexerReturnsthiswherearray/buffer[index(i, j, k)] = n- Specified by:
putin classIntIndexer
-
put
Description copied from class:IntIndexerReturnsthiswherearray/buffer[index(indices)] = n- Specified by:
putin classIntIndexer
-
put
Description copied from class:IntIndexerReturnsthiswherearray/buffer[index(indices)] = n[offset:offset + length]- Specified by:
putin classIntIndexer
-
release
-