VectorReadable2LType
, VectorStorageIntegral2Type
, VectorStorageType
, TensorByteBufferedType
, VectorByteBufferedIntegral2Type
, VectorByteBufferedType
public final class VectorByteBufferedIntegral2s32 extends Object implements VectorByteBufferedIntegral2Type
A storage vector.
Storage component type: int
Storage component count: 2
Modifier and Type | Method | Description |
---|---|---|
ByteBuffer |
byteBuffer() |
|
long |
byteOffset() |
|
protected int |
byteOffsetForIndex(int component_index) |
|
protected int |
componentBytes() |
|
protected int |
componentCount() |
|
static VectorByteBufferedIntegral2s32 |
createWithBase(ByteBuffer b,
com.io7m.mutable.numbers.core.MutableLongType base,
int offset) |
Return a new vector that is backed by the given byte buffer
b |
int |
offset() |
|
void |
setX(long x) |
Set the
x component. |
void |
setY(long y) |
Set the
Y component. |
int |
sizeBytes() |
|
long |
x() |
|
long |
y() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
byteBuffer, byteOffset, offset, sizeBytes
setVector2I, setVector2L, setXY
public static VectorByteBufferedIntegral2s32 createWithBase(ByteBuffer b, com.io7m.mutable.numbers.core.MutableLongType base, int offset)
Return a new vector that is backed by the given byte buffer
b
The data for the instance will be taken from the data at the current
value of base.get() + offset
, each time a field is requested or
set.
No initialization of the data is performed.
b
- The byte bufferbase
- The base addressoffset
- A constant offsetprotected int componentCount()
public long x()
x
in interface VectorReadable2LType
x
componentpublic long y()
y
in interface VectorReadable2LType
y
componentpublic void setX(long x)
VectorStorageIntegral2Type
x
component.setX
in interface VectorStorageIntegral2Type
x
- The X componentpublic void setY(long y)
VectorStorageIntegral2Type
Y
component.setY
in interface VectorStorageIntegral2Type
y
- The Y componentprotected final int componentBytes()
public final ByteBuffer byteBuffer()
byteBuffer
in interface TensorByteBufferedType
public final long byteOffset()
byteOffset
in interface TensorByteBufferedType
public final int offset()
offset
in interface TensorByteBufferedType
TensorByteBufferedType.byteOffset()
.public final int sizeBytes()
sizeBytes
in interface TensorByteBufferedType
protected final int byteOffsetForIndex(int component_index)
Copyright © 2017 <code@io7m.com> http://io7m.com