com.io7m.jtensors.bytebuffered

## Class VectorByteBufferedM4F

- java.lang.Object
- - com.io7m.jtensors.bytebuffered.VectorByteBufferedM4F

- All Implemented Interfaces:
    ByteBufferedType, VectorByteBuffered4FType, Vector4FType, VectorReadable2FType, VectorReadable3FType, VectorReadable4FType, VectorWritable2FType, VectorWritable3FType, VectorWritable4FType

      public final class VectorByteBufferedM4F
      extends Object
      implements VectorByteBuffered4FType

  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` | `copyFrom4F(VectorReadable4FType in_v)` Set the current vector to the contents of the input vector.
    `boolean` | `equals(Object obj)`
    `long` | `getByteOffset()`
    `float` | `getWF()`
    `float` | `getXF()`
    `float` | `getYF()`
    `float` | `getZF()`
    `int` | `hashCode()`
    `static VectorByteBuffered4FType` | `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` | `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` | `set4F(float x, float y, float z, float 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` | `setWF(float w)` Set the current `w` value 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 java.lang.Object

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

- - ### Method Detail

    - #### newVectorFromByteBuffer

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

      Parameters:
        `b` - The byte buffer
        `byte_offset` - A byte offset
      Returns:
        A new buffered vector

    - #### getWF

          public float getWF()

      Specified by:
        `getWF` in interface `VectorReadable4FType`
      Returns:
        The W value of the given vector.

    - #### setWF

          public void setWF(float w)

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

    - #### 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.

    - #### copyFrom4F

          public void copyFrom4F(VectorReadable4FType in_v)

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

    - #### set4F

          public void set4F(float x,
                            float y,
                            float z,
                            float w)

      Description copied from interface: `VectorWritable4FType`
      Set the current `x`, `y`, `z` and `w` values of the current vector.
      Specified by:
        `set4F` in interface `VectorWritable4FType`
      Parameters:
        `x` - The new `x` value.
        `y` - The new `y` value.
        `z` - The new `z` value.
        `w` - The new `w` 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`

    - #### 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