com.io7m.jtensors.bytebuffered.parameterized

## Class PVectorByteBufferedM3F<T>

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

- Type Parameters:
    `T` - A phantom type parameter
  All Implemented Interfaces:
    ByteBufferedType, PVectorByteBuffered2FType<T>, PVectorByteBuffered3FType<T>, PVector2FType<T>, PVector3FType<T>, PVectorReadable2FType<T>, PVectorReadable3FType<T>, PVectorWritable2FType<T>, PVectorWritable3FType<T>, Vector2FType, Vector3FType, VectorReadable2FType, VectorReadable3FType, VectorWritable2FType, VectorWritable3FType

      public final class PVectorByteBufferedM3F<T>
      extends ByteBuffered
      implements PVectorByteBuffered3FType<T>

  A four-element vector type with `float` 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` | `copyFrom2F(VectorReadable2FType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFrom3F(VectorReadable3FType in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped2F(PVectorReadable2FType<T> in_v)` Set the current vector to the contents of the input vector.
    `void` | `copyFromTyped3F(PVectorReadable3FType<T> in_v)` Set the current vector to the contents of the input vector.
    `boolean` | `equals(Object obj)`
    `float` | `getXF()`
    `float` | `getYF()`
    `float` | `getZF()`
    `int` | `hashCode()`
    `static <T> PVectorByteBuffered3FType<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 .
    `static <T> PVectorByteBuffered3FType<T>` | `newVectorFromByteBufferAndBase(ByteBuffer b, AtomicLong base, int offset)` Return a new vector that is backed by the given byte buffer `b`
    `void` | `set2F(float x, float y)` Set the current `x` and `y` values of the current vector.
    `void` | `set3F(float x, float y, float z)` Set the current `x`, `y` and `z` values of the current vector.
    `void` | `setXF(float x)` Set the current `x` value of the current vector.
    `void` | `setYF(float y)` Set the current `y` value of the current vector.
    `void` | `setZF(float z)` Set the current `z` value of the current vector.
    `String` | `toString()`

    - ### Methods inherited from class com.io7m.jtensors.bytebuffered.ByteBuffered

      `getByteOffset, getIndex, getOffset, setBase, setByteOffset`

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

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

    - ### Methods inherited from interface com.io7m.jtensors.bytebuffered.ByteBufferedType

      `getByteOffset, setByteOffset`

- - ### Method Detail

    - #### newVectorFromByteBuffer

          public static <T> PVectorByteBuffered3FType<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

    - #### newVectorFromByteBufferAndBase

          public static <T> PVectorByteBuffered3FType<T> newVectorFromByteBufferAndBase(ByteBuffer b,
                                                                                        AtomicLong 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

    - #### getZF

          public float getZF()

      Specified by:
        `getZF` in interface `VectorReadable3FType`
      Returns:
        The Z value of the given vector.

    - #### setZF

          public void setZF(float z)

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

    - #### getXF

          public float getXF()

      Specified by:
        `getXF` in interface `VectorReadable2FType`
      Returns:
        The X value of the given vector.

    - #### setXF

          public void setXF(float x)

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

    - #### getYF

          public float getYF()

      Specified by:
        `getYF` in interface `VectorReadable2FType`
      Returns:
        The Y value of the given vector.

    - #### setYF

          public void setYF(float y)

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

    - #### copyFrom3F

          public void copyFrom3F(VectorReadable3FType in_v)

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

    - #### set3F

          public void set3F(float x,
                            float y,
                            float z)

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

    - #### copyFrom2F

          public void copyFrom2F(VectorReadable2FType in_v)

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

    - #### set2F

          public void set2F(float x,
                            float y)

      Description copied from interface: `VectorWritable2FType`
      Set the current `x` and `y` values of the current vector.
      Specified by:
        `set2F` in interface `VectorWritable2FType`
      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`

    - #### copyFromTyped3F

          public void copyFromTyped3F(PVectorReadable3FType<T> in_v)

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

    - #### copyFromTyped2F

          public void copyFromTyped2F(PVectorReadable2FType<T> in_v)

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

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