T
- A phantom type parameterPVectorReadable2DType<T>
, PVectorReadable3DType<T>
, PVectorReadable4DType<T>
, VectorReadable2DType
, VectorReadable3DType
, VectorReadable4DType
, PVectorStorageFloating2Type<T>
, PVectorStorageFloating3Type<T>
, PVectorStorageFloating4Type<T>
, VectorStorageFloating2Type
, VectorStorageFloating3Type
, VectorStorageFloating4Type
, VectorStorageType
, PVectorByteBufferedFloating4Type<T>
, TensorByteBufferedType
, VectorByteBufferedType
public final class PVectorByteBufferedFloating4s16<T> extends Object implements PVectorByteBufferedFloating4Type<T>
A storage vector.
Storage component type: binary16
Storage component count: 4
Modifier and Type | Method | Description |
---|---|---|
ByteBuffer |
byteBuffer() |
|
long |
byteOffset() |
|
protected int |
byteOffsetForIndex(int component_index) |
|
protected int |
componentBytes() |
|
protected int |
componentCount() |
|
static <T> PVectorByteBufferedFloating4s16<T> |
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 |
setW(double w) |
Set the
w component. |
void |
setX(double x) |
Set the
x component. |
void |
setY(double y) |
Set the
Y component. |
void |
setZ(double z) |
Set the
z component. |
int |
sizeBytes() |
|
double |
w() |
|
double |
x() |
|
double |
y() |
|
double |
z() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setPVector2D, setPVector2F
setPVector3D, setPVector3F
setPVector4D, setPVector4F
byteBuffer, byteOffset, offset, sizeBytes
setVector2D, setVector2F, setXY
setVector3D, setVector3F, setXYZ
setVector4D, setVector4F, setXYZW
public static <T> PVectorByteBufferedFloating4s16<T> 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.
T
- A phantom type parameterb
- The byte bufferbase
- The base addressoffset
- A constant offsetprotected int componentCount()
public double x()
x
in interface VectorReadable2DType
x
componentpublic double y()
y
in interface VectorReadable2DType
y
componentpublic double z()
z
in interface VectorReadable3DType
z
componentpublic double w()
w
in interface VectorReadable4DType
w
componentpublic void setX(double x)
VectorStorageFloating2Type
x
component.setX
in interface VectorStorageFloating2Type
x
- The X componentpublic void setY(double y)
VectorStorageFloating2Type
Y
component.setY
in interface VectorStorageFloating2Type
y
- The Y componentpublic void setZ(double z)
VectorStorageFloating3Type
z
component.setZ
in interface VectorStorageFloating3Type
z
- The Z componentpublic void setW(double w)
VectorStorageFloating4Type
w
component.setW
in interface VectorStorageFloating4Type
w
- The W 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