Package com.io7m.jtensors.storage.bytebuffered

# Class PVectorByteBufferedFloating4s64<T>

java.lang.Object
com.io7m.jtensors.storage.bytebuffered.PVectorByteBufferedFloating4s64<T>

Type Parameters:
  `T` - A phantom type parameter

All Implemented Interfaces:
  `PVectorReadable2DType<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 PVectorByteBufferedFloating4s64<T>
    extends java.lang.Object
    implements PVectorByteBufferedFloating4Type<T>

A storage vector.

Storage component type: `double`

Storage component count: `4`

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `java.nio.ByteBuffer` | `byteBuffer()` |
  `long` | `byteOffset()` |
  `protected int` | `byteOffsetForIndex​(int component_index)` |
  `protected int` | `componentBytes()` |
  `protected int` | `componentCount()` |
  `static <T> PVectorByteBufferedFloating4s64<T>` | `createWithBase​(java.nio.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()` |

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface com.io7m.jtensors.storage.api.parameterized.vectors.PVectorStorageFloating2Type

  `setPVector2D, setPVector2F`

  ### Methods inherited from interface com.io7m.jtensors.storage.api.parameterized.vectors.PVectorStorageFloating3Type

  `setPVector3D, setPVector3F`

  ### Methods inherited from interface com.io7m.jtensors.storage.api.parameterized.vectors.PVectorStorageFloating4Type

  `setPVector4D, setPVector4F`

  ### Methods inherited from interface com.io7m.jtensors.storage.bytebuffered.TensorByteBufferedType

  `byteBuffer, byteOffset, offset, sizeBytes`

  ### Methods inherited from interface com.io7m.jtensors.storage.api.unparameterized.vectors.VectorStorageFloating2Type

  `setVector2D, setVector2F, setXY`

  ### Methods inherited from interface com.io7m.jtensors.storage.api.unparameterized.vectors.VectorStorageFloating3Type

  `setVector3D, setVector3F, setXYZ`

  ### Methods inherited from interface com.io7m.jtensors.storage.api.unparameterized.vectors.VectorStorageFloating4Type

  `setVector4D, setVector4F, setXYZW`

- ## Method Details

  - ### createWithBase

    public static <T> PVectorByteBufferedFloating4s64<T> createWithBase​(java.nio.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.

    Type Parameters:
      `T` - A phantom type parameter
    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

  - ### w

    public double w()
    Specified by:
      `w` in interface `VectorReadable4DType`
    Returns:
      The `w` 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

  - ### setW

    public void setW​(double w)
    Description copied from interface: `VectorStorageFloating4Type`
    Set the `w` component.
    Specified by:
      `setW` in interface `VectorStorageFloating4Type`
    Parameters:
      `w` - The W component

  - ### componentBytes

    protected final int componentBytes()

  - ### byteBuffer

    public final java.nio.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)