com.io7m.jtensors.bytebuffered.parameterized

## Class PVectorByteBufferedM4D<T>

- java.lang.Object
- - com.io7m.jtensors.bytebuffered.parameterized.PVectorByteBufferedM4D<T>

- Type Parameters:
    `T` - A phantom type parameter
  All Implemented Interfaces:
    ByteBufferedType, PVectorByteBuffered4DType<T>, PVector4DType<T>, PVectorReadable2DType<T>, PVectorReadable3DType<T>, PVectorReadable4DType<T>, PVectorWritable2DType<T>, PVectorWritable3DType<T>, PVectorWritable4DType<T>, Vector4DType, VectorReadable2DType, VectorReadable3DType, VectorReadable4DType, VectorWritable2DType, VectorWritable3DType, VectorWritable4DType

      public final class PVectorByteBufferedM4D<T>
      extends Object
      implements PVectorByteBuffered4DType<T>

  A four-element vector type with `double` elements, packed into a `ByteBuffer`.

  Values of this type cannot be accessed safely from multiple threads without explicit synchronization.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `copyFrom2D(VectorReadable2DType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFrom3D(VectorReadable3DType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFrom4D(VectorReadable4DType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped2D(PVectorReadable2DType<T> in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped3D(PVectorReadable3DType<T> in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped4D(PVectorReadable4DType<T> in_v)` Set the current vector to the contents of the input vector.
    `boolean` | `equals(Object obj)`
    `long` | `getByteOffset()`
    `double` | `getWD()`
    `double` | `getXD()`
    `double` | `getYD()`
    `double` | `getZD()`
    `int` | `hashCode()`
    `static <T> PVectorByteBuffered4DType<T>` | `newVectorFromByteBuffer(ByteBuffer b, long byte_offset)` Return a new vector that is backed by whatever data is at byte offset `byte_offset` in the byte buffer .
    `void` | `set2D(double x, double y)` Set the current `x` and `y` values of the current vector.
    `void` | `set3D(double x, double y, double z)` Set the current `x`, `y` and `z` values of the current vector.
    `void` | `set4D(double x, double y, double z, double w)` Set the current `x`, `y`, `z` and `w` values of the current vector.
    `void` | `setByteOffset(long b)` Set the base byte offset of this value.
    `void` | `setWD(double w)` Set the current `w` value of the current vector.
    `void` | `setXD(double x)` Set the current `x` value of the current vector.
    `void` | `setYD(double y)` Set the current `y` value of the current vector.
    `void` | `setZD(double z)` Set the current `z` value of the current vector.
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### newVectorFromByteBuffer

          public static <T> PVectorByteBuffered4DType<T> newVectorFromByteBuffer(ByteBuffer b,
                                                                                 long byte_offset)

      Return a new vector that is backed by whatever data is at byte offset `byte_offset` in the byte buffer .

      No initialization of the data is performed.

      Type Parameters:
        `T` - A phantom type parameter
      Parameters:
        `b` - The byte buffer
        `byte_offset` - A byte offset
      Returns:
        A new buffered vector

    - #### getWD

          public double getWD()

      Specified by:
        `getWD` in interface `VectorReadable4DType`
      Returns:
        The W value of the given vector.

    - #### setWD

          public void setWD(double w)

      Description copied from interface: `VectorWritable4DType`
      Set the current `w` value of the current vector.
      Specified by:
        `setWD` in interface `VectorWritable4DType`
      Parameters:
        `w` - The new `w` value.

    - #### getZD

          public double getZD()

      Specified by:
        `getZD` in interface `VectorReadable3DType`
      Returns:
        The Z value of the given vector.

    - #### setZD

          public void setZD(double z)

      Description copied from interface: `VectorWritable3DType`
      Set the current `z` value of the current vector.
      Specified by:
        `setZD` in interface `VectorWritable3DType`
      Parameters:
        `z` - The new `z` value.

    - #### getXD

          public double getXD()

      Specified by:
        `getXD` in interface `VectorReadable2DType`
      Returns:
        The X value of the given vector.

    - #### setXD

          public void setXD(double x)

      Description copied from interface: `VectorWritable2DType`
      Set the current `x` value of the current vector.
      Specified by:
        `setXD` in interface `VectorWritable2DType`
      Parameters:
        `x` - The new `x` value.

    - #### getYD

          public double getYD()

      Specified by:
        `getYD` in interface `VectorReadable2DType`
      Returns:
        The Y value of the given vector.

    - #### setYD

          public void setYD(double y)

      Description copied from interface: `VectorWritable2DType`
      Set the current `y` value of the current vector.
      Specified by:
        `setYD` in interface `VectorWritable2DType`
      Parameters:
        `y` - The new `y` value.

    - #### copyFrom4D

          public void copyFrom4D(VectorReadable4DType in_v)

      Description copied from interface: `VectorWritable4DType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFrom4D` in interface `VectorWritable4DType`
      Parameters:
        `in_v` - The input vector

    - #### set4D

          public void set4D(double x,
                            double y,
                            double z,
                            double w)

      Description copied from interface: `VectorWritable4DType`
      Set the current `x`, `y`, `z` and `w` values of the current vector.
      Specified by:
        `set4D` in interface `VectorWritable4DType`
      Parameters:
        `x` - The new `x` value.
        `y` - The new `y` value.
        `z` - The new `z` value.
        `w` - The new `w` value.

    - #### copyFrom3D

          public void copyFrom3D(VectorReadable3DType in_v)

      Description copied from interface: `VectorWritable3DType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFrom3D` in interface `VectorWritable3DType`
      Parameters:
        `in_v` - The input vector

    - #### set3D

          public void set3D(double x,
                            double y,
                            double z)

      Description copied from interface: `VectorWritable3DType`
      Set the current `x`, `y` and `z` values of the current vector.
      Specified by:
        `set3D` in interface `VectorWritable3DType`
      Parameters:
        `x` - The new `x` value.
        `y` - The new `y` value.
        `z` - The new `z` value.

    - #### copyFrom2D

          public void copyFrom2D(VectorReadable2DType in_v)

      Description copied from interface: `VectorWritable2DType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFrom2D` in interface `VectorWritable2DType`
      Parameters:
        `in_v` - The input vector

    - #### set2D

          public void set2D(double x,
                            double y)

      Description copied from interface: `VectorWritable2DType`
      Set the current `x` and `y` values of the current vector.
      Specified by:
        `set2D` in interface `VectorWritable2DType`
      Parameters:
        `x` - The new `x` value.
        `y` - The new `y` value.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### copyFromTyped4D

          public void copyFromTyped4D(PVectorReadable4DType<T> in_v)

      Description copied from interface: `PVectorWritable4DType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFromTyped4D` in interface `PVectorWritable4DType<T>`
      Parameters:
        `in_v` - The input vector

    - #### copyFromTyped3D

          public void copyFromTyped3D(PVectorReadable3DType<T> in_v)

      Description copied from interface: `PVectorWritable3DType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFromTyped3D` in interface `PVectorWritable3DType<T>`
      Parameters:
        `in_v` - The input vector

    - #### copyFromTyped2D

          public void copyFromTyped2D(PVectorReadable2DType<T> in_v)

      Description copied from interface: `PVectorWritable2DType`
      Set the current vector to the contents of the input vector.
      Specified by:
        `copyFromTyped2D` in interface `PVectorWritable2DType<T>`
      Parameters:
        `in_v` - The input vector

    - #### getByteOffset

          public long getByteOffset()

      Specified by:
        `getByteOffset` in interface `ByteBufferedType`
      Returns:
        The base byte offset of this value

    - #### setByteOffset

          public void setByteOffset(long b)

      Description copied from interface: `ByteBufferedType`

      Set the base byte offset of this value.

      Must be non-negative.

      Specified by:
        `setByteOffset` in interface `ByteBufferedType`
      Parameters:
        `b` - The offset in bytes

Copyright © 2015 <code@io7m.com> http://io7m.com