Class VectorByteBufferedFloating3s16

java.lang.Object
com.io7m.jtensors.storage.bytebuffered.VectorByteBufferedFloating3s16
All Implemented Interfaces:
VectorReadable2DType, VectorReadable3DType, VectorStorageFloating2Type, VectorStorageFloating3Type, VectorStorageType, TensorByteBufferedType, VectorByteBufferedFloating2Type, VectorByteBufferedFloating3Type, VectorByteBufferedType

public final class VectorByteBufferedFloating3s16 extends Object implements VectorByteBufferedFloating3Type

A storage vector.

Storage component type: binary16

Storage component count: 3

  • Method Details

    • createWithBase

      public static VectorByteBufferedFloating3s16 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.

      Parameters:
      b - The byte buffer
      base - The base address
      offset - A constant offset
      Returns:
      A new buffered vector
    • componentCount

      protected int componentCount()
    • x

      public double x()
      Specified by:
      x in interface VectorReadable2DType
      Returns:
      The x component
    • y

      public double y()
      Specified by:
      y in interface VectorReadable2DType
      Returns:
      The y component
    • z

      public double z()
      Specified by:
      z in interface VectorReadable3DType
      Returns:
      The z component
    • setX

      public void setX(double x)
      Description copied from interface: VectorStorageFloating2Type
      Set the x component.
      Specified by:
      setX in interface VectorStorageFloating2Type
      Parameters:
      x - The X component
    • setY

      public void setY(double y)
      Description copied from interface: VectorStorageFloating2Type
      Set the Y component.
      Specified by:
      setY in interface VectorStorageFloating2Type
      Parameters:
      y - The Y component
    • setZ

      public void setZ(double z)
      Description copied from interface: VectorStorageFloating3Type
      Set the z component.
      Specified by:
      setZ in interface VectorStorageFloating3Type
      Parameters:
      z - The Z component
    • componentBytes

      protected final int componentBytes()
    • byteBuffer

      public final ByteBuffer byteBuffer()
      Specified by:
      byteBuffer in interface TensorByteBufferedType
      Returns:
      The byte buffer that backs the tensor
    • byteOffset

      public final long byteOffset()
      Specified by:
      byteOffset in interface TensorByteBufferedType
      Returns:
      The byte offset of the current tensor
    • offset

      public final int offset()
      Specified by:
      offset in interface TensorByteBufferedType
      Returns:
      A constant offset added to TensorByteBufferedType.byteOffset().
    • sizeBytes

      public final int sizeBytes()
      Specified by:
      sizeBytes in interface TensorByteBufferedType
      Returns:
      The size of a single tensor in bytes
    • byteOffsetForIndex

      protected final int byteOffsetForIndex(int component_index)