Package org.bytedeco.javacpp.indexer
Class ByteRawIndexer
- java.lang.Object
-
- org.bytedeco.javacpp.indexer.Indexer
-
- org.bytedeco.javacpp.indexer.ByteIndexer
-
- org.bytedeco.javacpp.indexer.ByteRawIndexer
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class ByteRawIndexer extends ByteIndexer
An indexer for aBytePointerusing theRawinstance.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) longbaseBase address and number of elements accessible.protected BytePointerpointerThe backing pointer.protected static RawRAWThe instance for the raw memory interface.(package private) longsizeBase address and number of elements accessible.-
Fields inherited from class org.bytedeco.javacpp.indexer.ByteIndexer
VALUE_BYTES
-
-
Constructor Summary
Constructors Constructor Description ByteRawIndexer(BytePointer pointer)CallsByteRawIndexer(pointer, Index.create(pointer.limit() - pointer.position())).ByteRawIndexer(BytePointer pointer, long... sizes)CallsByteRawIndexer(pointer, Index.create(sizes)).ByteRawIndexer(BytePointer pointer, long[] sizes, long[] strides)CallsByteRawIndexer(pointer, Index.create(sizes, strides)).ByteRawIndexer(BytePointer pointer, Index index)Constructor to set thepointerandIndexer.index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byteget(long i)Returnsarray/buffer[index(i)]byteget(long... indices)Returnsarray/buffer[index(indices)]ByteIndexerget(long[] indices, byte[] b, int offset, int length)Returnsthiswhereb[offset:offset + length] = array/buffer[index(indices)]ByteIndexerget(long i, byte[] b, int offset, int length)Returnsthiswhereb[offset:offset + length] = array/buffer[index(i)]byteget(long i, long j)Returnsarray/buffer[index(i, j)]ByteIndexerget(long i, long j, byte[] b, int offset, int length)Returnsthiswhereb[offset:offset + length] = array/buffer[index(i, j)]byteget(long i, long j, long k)Returnsarray/buffer[index(i, j, k)]bytegetByte(long i)Returns thebytevalue atarray/buffer[i]chargetChar(long i)Returns thecharvalue atarray/buffer[i]doublegetDouble(long i)Returns thedoublevalue atarray/buffer[i]floatgetFloat(long i)Returns thefloatvalue atarray/buffer[i]intgetInt(long i)Returns theintvalue atarray/buffer[i]longgetLong(long i)Returns thelongvalue atarray/buffer[i]bytegetRaw(long i)shortgetShort(long i)Returns theshortvalue atarray/buffer[i]Pointerpointer()Returns the backing pointer, ornullif noneByteIndexerput(long[] indices, byte b)Returnsthiswherearray/buffer[index(indices)] = bByteIndexerput(long[] indices, byte[] b, int offset, int length)Returnsthiswherearray/buffer[index(indices)] = b[offset:offset + length]ByteIndexerput(long i, byte b)Returnsthiswherearray/buffer[index(i)] = bByteIndexerput(long i, byte[] b, int offset, int length)Returnsthiswherearray/buffer[index(i)] = b[offset:offset + length]ByteIndexerput(long i, long j, byte b)Returnsthiswherearray/buffer[index(i, j)] = bByteIndexerput(long i, long j, byte[] b, int offset, int length)Returnsthiswherearray/buffer[index(i, j)] = b[offset:offset + length]ByteIndexerput(long i, long j, long k, byte b)Returnsthiswherearray/buffer[index(i, j, k)] = bByteIndexerputByte(long i, byte b)Sets thebytevalue atarray/buffer[i]ByteIndexerputChar(long i, char c)Sets thecharvalue atarray/buffer[i]ByteIndexerputDouble(long i, double d)Sets thedoublevalue atarray/buffer[i]ByteIndexerputFloat(long i, float f)Sets thefloatvalue atarray/buffer[i]ByteIndexerputInt(long i, int j)Sets theintvalue atarray/buffer[i]ByteIndexerputLong(long i, long j)Sets thelongvalue atarray/buffer[i]ByteIndexerputRaw(long i, byte b)ByteIndexerputShort(long i, short s)Sets theshortvalue atarray/buffer[i]ByteIndexerreindex(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.ByteIndexer
create, create, create, create, create, create, create, create, create, create, create, create, create, create, get, get, get, getBfloat16, getBoolean, getDouble, getHalf, getUByte, getUInt, getULong, getUShort, put, put, put, putBfloat16, putBoolean, putDouble, putHalf, putUByte, putUInt, putULong, putUShort
-
-
-
-
Field Detail
-
RAW
protected static final Raw RAW
The instance for the raw memory interface.
-
pointer
protected BytePointer 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
-
ByteRawIndexer
public ByteRawIndexer(BytePointer pointer)
CallsByteRawIndexer(pointer, Index.create(pointer.limit() - pointer.position())).
-
ByteRawIndexer
public ByteRawIndexer(BytePointer pointer, long... sizes)
CallsByteRawIndexer(pointer, Index.create(sizes)).
-
ByteRawIndexer
public ByteRawIndexer(BytePointer pointer, long[] sizes, long[] strides)
CallsByteRawIndexer(pointer, Index.create(sizes, strides)).
-
ByteRawIndexer
public ByteRawIndexer(BytePointer pointer, Index index)
Constructor to set thepointerandIndexer.index.
-
-
Method Detail
-
pointer
public Pointer pointer()
Description copied from class:IndexerReturns the backing pointer, ornullif none
-
reindex
public ByteIndexer reindex(Index index)
Description copied from class:IndexerReturns a new Indexer using the same data, but with a different Index.
-
getRaw
public byte getRaw(long i)
-
get
public byte get(long i)
Description copied from class:ByteIndexerReturnsarray/buffer[index(i)]- Specified by:
getin classByteIndexer
-
get
public ByteIndexer get(long i, byte[] b, int offset, int length)
Description copied from class:ByteIndexerReturnsthiswhereb[offset:offset + length] = array/buffer[index(i)]- Specified by:
getin classByteIndexer
-
get
public byte get(long i, long j)Description copied from class:ByteIndexerReturnsarray/buffer[index(i, j)]- Specified by:
getin classByteIndexer
-
get
public ByteIndexer get(long i, long j, byte[] b, int offset, int length)
Description copied from class:ByteIndexerReturnsthiswhereb[offset:offset + length] = array/buffer[index(i, j)]- Specified by:
getin classByteIndexer
-
get
public byte get(long i, long j, long k)Description copied from class:ByteIndexerReturnsarray/buffer[index(i, j, k)]- Specified by:
getin classByteIndexer
-
get
public byte get(long... indices)
Description copied from class:ByteIndexerReturnsarray/buffer[index(indices)]- Specified by:
getin classByteIndexer
-
get
public ByteIndexer get(long[] indices, byte[] b, int offset, int length)
Description copied from class:ByteIndexerReturnsthiswhereb[offset:offset + length] = array/buffer[index(indices)]- Specified by:
getin classByteIndexer
-
putRaw
public ByteIndexer putRaw(long i, byte b)
-
put
public ByteIndexer put(long i, byte b)
Description copied from class:ByteIndexerReturnsthiswherearray/buffer[index(i)] = b- Specified by:
putin classByteIndexer
-
put
public ByteIndexer put(long i, byte[] b, int offset, int length)
Description copied from class:ByteIndexerReturnsthiswherearray/buffer[index(i)] = b[offset:offset + length]- Specified by:
putin classByteIndexer
-
put
public ByteIndexer put(long i, long j, byte b)
Description copied from class:ByteIndexerReturnsthiswherearray/buffer[index(i, j)] = b- Specified by:
putin classByteIndexer
-
put
public ByteIndexer put(long i, long j, byte[] b, int offset, int length)
Description copied from class:ByteIndexerReturnsthiswherearray/buffer[index(i, j)] = b[offset:offset + length]- Specified by:
putin classByteIndexer
-
put
public ByteIndexer put(long i, long j, long k, byte b)
Description copied from class:ByteIndexerReturnsthiswherearray/buffer[index(i, j, k)] = b- Specified by:
putin classByteIndexer
-
put
public ByteIndexer put(long[] indices, byte b)
Description copied from class:ByteIndexerReturnsthiswherearray/buffer[index(indices)] = b- Specified by:
putin classByteIndexer
-
put
public ByteIndexer put(long[] indices, byte[] b, int offset, int length)
Description copied from class:ByteIndexerReturnsthiswherearray/buffer[index(indices)] = b[offset:offset + length]- Specified by:
putin classByteIndexer
-
getByte
public byte getByte(long i)
Description copied from class:ByteIndexerReturns thebytevalue atarray/buffer[i]- Specified by:
getBytein classByteIndexer
-
putByte
public ByteIndexer putByte(long i, byte b)
Description copied from class:ByteIndexerSets thebytevalue atarray/buffer[i]- Specified by:
putBytein classByteIndexer
-
getShort
public short getShort(long i)
Description copied from class:ByteIndexerReturns theshortvalue atarray/buffer[i]- Specified by:
getShortin classByteIndexer
-
putShort
public ByteIndexer putShort(long i, short s)
Description copied from class:ByteIndexerSets theshortvalue atarray/buffer[i]- Specified by:
putShortin classByteIndexer
-
getInt
public int getInt(long i)
Description copied from class:ByteIndexerReturns theintvalue atarray/buffer[i]- Specified by:
getIntin classByteIndexer
-
putInt
public ByteIndexer putInt(long i, int j)
Description copied from class:ByteIndexerSets theintvalue atarray/buffer[i]- Specified by:
putIntin classByteIndexer
-
getLong
public long getLong(long i)
Description copied from class:ByteIndexerReturns thelongvalue atarray/buffer[i]- Specified by:
getLongin classByteIndexer
-
putLong
public ByteIndexer putLong(long i, long j)
Description copied from class:ByteIndexerSets thelongvalue atarray/buffer[i]- Specified by:
putLongin classByteIndexer
-
getFloat
public float getFloat(long i)
Description copied from class:ByteIndexerReturns thefloatvalue atarray/buffer[i]- Specified by:
getFloatin classByteIndexer
-
putFloat
public ByteIndexer putFloat(long i, float f)
Description copied from class:ByteIndexerSets thefloatvalue atarray/buffer[i]- Specified by:
putFloatin classByteIndexer
-
getDouble
public double getDouble(long i)
Description copied from class:ByteIndexerReturns thedoublevalue atarray/buffer[i]- Specified by:
getDoublein classByteIndexer
-
putDouble
public ByteIndexer putDouble(long i, double d)
Description copied from class:ByteIndexerSets thedoublevalue atarray/buffer[i]- Specified by:
putDoublein classByteIndexer
-
getChar
public char getChar(long i)
Description copied from class:ByteIndexerReturns thecharvalue atarray/buffer[i]- Specified by:
getCharin classByteIndexer
-
putChar
public ByteIndexer putChar(long i, char c)
Description copied from class:ByteIndexerSets thecharvalue atarray/buffer[i]- Specified by:
putCharin classByteIndexer
-
-