com.io7m.jtensors

## Class MatrixDirectM2x2F

- java.lang.Object
- - com.io7m.jtensors.MatrixDirectM2x2F

- All Implemented Interfaces:
    Matrix2x2FType, MatrixDirect2x2FType, MatrixDirectFType, MatrixDirectReadable2x2FType, MatrixReadable2x2FType, MatrixReadableFType, MatrixWritable2x2FType, MatrixWritableFType

      public final class MatrixDirectM2x2F
      extends Object
      implements MatrixDirect2x2FType

  The default implementation of the `MatrixDirect2x2FType` interface.

  Since:
    7.0.0

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `FloatBuffer` | `getDirectFloatBuffer()`
    `float` | `getR0C0F()`
    `float` | `getR0C1F()`
    `float` | `getR1C0F()`
    `float` | `getR1C1F()`
    `<V extends VectorWritable2FType> void` | `getRow2F(int row, V out)` Retrieve row `row`, saving the result to `out`.
    `<V extends VectorWritable2FType> void` | `getRow2FUnsafe(int row, V out)` Retrieve row `row`, saving the result to `out`.
    `float` | `getRowColumnF(int row, int column)`
    `int` | `hashCode()`
    `static MatrixDirect2x2FType` | `newMatrix()`
    `static MatrixDirect2x2FType` | `newMatrixFrom(MatrixReadable2x2FType m)`
    `void` | `setR0C0F(float x)` Set row 0, column 0 of the matrix to `x`.
    `void` | `setR0C1F(float x)` Set row 0, column 1 of the matrix to `x`.
    `void` | `setR1C0F(float x)` Set row 1, column 0 of the matrix to `x`.
    `void` | `setR1C1F(float x)` Set row 1, column 1 of the matrix to `x`.
    `void` | `setRowColumnF(int row, int column, float x)` Set the value from the matrix at row `row`, column `column` to `value`.
    `void` | `setRowWith2F(int row, VectorReadable2FType v)` Set row `row` of the matrix to `v`.
    `void` | `setRowWith2FUnsafe(int row, VectorReadable2FType v)` Set row `row` of the matrix to `v`.
    `String` | `toString()`

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

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

- - ### Method Detail

    - #### newMatrix

          public static MatrixDirect2x2FType newMatrix()

      Returns:
        A new identity matrix

    - #### newMatrixFrom

          public static MatrixDirect2x2FType newMatrixFrom(MatrixReadable2x2FType m)

      Parameters:
        `m` - The source matrix
      Returns:
        A new matrix based on the given matrix

    - #### getDirectFloatBuffer

          public FloatBuffer getDirectFloatBuffer()

      Specified by:
        `getDirectFloatBuffer` in interface `MatrixDirectFType`
      Returns:
        The direct-memory float buffer that backs the matrix.

    - #### setRowWith2F

          public void setRowWith2F(int row,
                                   VectorReadable2FType v)

      Description copied from interface: `MatrixWritable2x2FType`
      Set row `row` of the matrix to `v`.
      Specified by:
        `setRowWith2F` in interface `MatrixWritable2x2FType`
      Parameters:
        `row` - The row index
        `v` - The row vector

    - #### setRowWith2FUnsafe

          public void setRowWith2FUnsafe(int row,
                                         VectorReadable2FType v)

      Description copied from interface: `MatrixWritable2x2FType`
      Set row `row` of the matrix to `v`. No bounds checking is performed for `row`, and out-of-bounds values result in undefined behaviour.
      Specified by:
        `setRowWith2FUnsafe` in interface `MatrixWritable2x2FType`
      Parameters:
        `row` - The row index
        `v` - The row vector

    - #### getRow2F

          public <V extends VectorWritable2FType> void getRow2F(int row,
                                                                V out)

      Description copied from interface: `MatrixReadable2x2FType`
      Retrieve row `row`, saving the result to `out`.
      Specified by:
        `getRow2F` in interface `MatrixReadable2x2FType`
      Type Parameters:
        `V` - The precise type of writable vector.
      Parameters:
        `row` - The index of the row, starting at `0`.
        `out` - The output vector.

    - #### getRow2FUnsafe

          public <V extends VectorWritable2FType> void getRow2FUnsafe(int row,
                                                                      V out)

      Description copied from interface: `MatrixReadable2x2FType`
      Retrieve row `row`, saving the result to `out`. No bounds checking is performed for `row`, and out-of-bounds values result in undefined behaviour.
      Specified by:
        `getRow2FUnsafe` in interface `MatrixReadable2x2FType`
      Type Parameters:
        `V` - The precise type of writable vector.
      Parameters:
        `row` - The index of the row, starting at `0`.
        `out` - The output vector.

    - #### getR0C0F

          public float getR0C0F()

      Specified by:
        `getR0C0F` in interface `MatrixReadable2x2FType`
      Returns:
        The value at row 0, column 0

    - #### setR0C0F

          public void setR0C0F(float x)

      Description copied from interface: `MatrixWritable2x2FType`
      Set row 0, column 0 of the matrix to `x`.
      Specified by:
        `setR0C0F` in interface `MatrixWritable2x2FType`
      Parameters:
        `x` - The value

    - #### getR1C0F

          public float getR1C0F()

      Specified by:
        `getR1C0F` in interface `MatrixReadable2x2FType`
      Returns:
        The value at row 1, column 0

    - #### setR1C0F

          public void setR1C0F(float x)

      Description copied from interface: `MatrixWritable2x2FType`
      Set row 1, column 0 of the matrix to `x`.
      Specified by:
        `setR1C0F` in interface `MatrixWritable2x2FType`
      Parameters:
        `x` - The value

    - #### getR0C1F

          public float getR0C1F()

      Specified by:
        `getR0C1F` in interface `MatrixReadable2x2FType`
      Returns:
        The value at row 0, column 1

    - #### setR0C1F

          public void setR0C1F(float x)

      Description copied from interface: `MatrixWritable2x2FType`
      Set row 0, column 1 of the matrix to `x`.
      Specified by:
        `setR0C1F` in interface `MatrixWritable2x2FType`
      Parameters:
        `x` - The value

    - #### getR1C1F

          public float getR1C1F()

      Specified by:
        `getR1C1F` in interface `MatrixReadable2x2FType`
      Returns:
        The value at row 1, column 1

    - #### setR1C1F

          public void setR1C1F(float x)

      Description copied from interface: `MatrixWritable2x2FType`
      Set row 1, column 1 of the matrix to `x`.
      Specified by:
        `setR1C1F` in interface `MatrixWritable2x2FType`
      Parameters:
        `x` - The value

    - #### getRowColumnF

          public float getRowColumnF(int row,
                                     int column)

      Specified by:
        `getRowColumnF` in interface `MatrixReadableFType`
      Parameters:
        `row` - The row
        `column` - The column
      Returns:
        The value from the matrix at row `row` , column `column`.

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### setRowColumnF

          public void setRowColumnF(int row,
                                    int column,
                                    float x)

      Description copied from interface: `MatrixWritableFType`
      Set the value from the matrix at row `row`, column `column` to `value`.
      Specified by:
        `setRowColumnF` in interface `MatrixWritableFType`
      Parameters:
        `row` - The row
        `column` - The column
        `x` - The value

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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