com.io7m.jtensors.parameterized

## Class PMatrixM3x3F

- java.lang.Object
- - com.io7m.jtensors.parameterized.PMatrixM3x3F

-     public final class PMatrixM3x3F
      extends Object

  A 3x3 mutable matrix type with `float` elements.

  Since:
    7.0.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `PMatrixM3x3F.ContextPM3F` The `ContextPM3F` type contains the minimum storage required for all of the functions of the `PMatrixM3x3F` class.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T0,T1,M extends PMatrixWritable3x3FType<T0,T1>> M` | `copy(PMatrixReadable3x3FType<T0,T1> input, M output)` Copy the contents of the matrix `input` to the matrix `output`, completely replacing all elements.
    `static <T0,T1,MOUT extends PMatrixWritable3x3FType<T1,T0>> boolean` | `invert(PMatrixM3x3F.ContextPM3F context, PMatrixReadable3x3FType<T0,T1> m, MOUT out)` Calculate the inverse of the matrix `m`, saving the resulting matrix to `out`.
    `static <T0,T1,T2,MOUT extends PMatrixWritable3x3FType<T0,T2>> MOUT` | `multiply(PMatrixReadable3x3FType<T1,T2> m0, PMatrixReadable3x3FType<T0,T1> m1, MOUT out)` Multiply the matrix `m0` with the matrix `m1`, writing the result to `out`.
    `static <T0,T1,V extends PVectorWritable3FType<T1>> V` | `multiplyVector3F(PMatrixM3x3F.ContextPM3F context, PMatrixReadable3x3FType<T0,T1> m, PVectorReadable3FType<T0> v, V out)` Multiply the matrix `m` with the vector `v`, writing the resulting vector to `out`.

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

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

- - ### Method Detail

    - #### invert

          public static <T0,T1,MOUT extends PMatrixWritable3x3FType<T1,T0>> boolean invert(PMatrixM3x3F.ContextPM3F context,
                                                                                           PMatrixReadable3x3FType<T0,T1> m,
                                                                                           MOUT out)

      Calculate the inverse of the matrix `m`, saving the resulting matrix to `out`. The function returns `Some(out)` iff it was possible to invert the matrix, and `None` otherwise. It is not possible to invert a matrix that has a determinant of `0`. If the function returns `None`, `m` is untouched.
      Type Parameters:
        `T0` - A phantom type parameter
        `T1` - A phantom type parameter
        `MOUT` - The precise type of output matrix
      Parameters:
        `context` - Preallocated storage
        `m` - The input matrix
        `out` - The output matrix
      Returns:
        `true` iff the matrix was invertible
      See Also:
        `MatrixM3x3F.determinant(com.io7m.jtensors.MatrixReadable3x3FType)`

    - #### multiply

          public static <T0,T1,T2,MOUT extends PMatrixWritable3x3FType<T0,T2>> MOUT multiply(PMatrixReadable3x3FType<T1,T2> m0,
                                                                                             PMatrixReadable3x3FType<T0,T1> m1,
                                                                                             MOUT out)

      Multiply the matrix `m0` with the matrix `m1`, writing the result to `out`.
      Type Parameters:
        `T0` - A phantom type parameter
        `T1` - A phantom type parameter
        `T2` - A phantom type parameter
        `MOUT` - The precise type of output matrix
      Parameters:
        `m0` - The left input vector
        `m1` - The right input vector
        `out` - The output vector
      Returns:
        `out`

    - #### multiplyVector3F

          public static <T0,T1,V extends PVectorWritable3FType<T1>> V multiplyVector3F(PMatrixM3x3F.ContextPM3F context,
                                                                                       PMatrixReadable3x3FType<T0,T1> m,
                                                                                       PVectorReadable3FType<T0> v,
                                                                                       V out)

      Multiply the matrix `m` with the vector `v`, writing the resulting vector to `out`.
      Type Parameters:
        `T0` - A phantom type parameter
        `T1` - A phantom type parameter
        `V` - The precise type of writable vector
      Parameters:
        `context` - Preallocated storage
        `m` - The input matrix
        `v` - The input vector
        `out` - The output vector
      Returns:
        `out`

    - #### copy

          public static <T0,T1,M extends PMatrixWritable3x3FType<T0,T1>> M copy(PMatrixReadable3x3FType<T0,T1> input,
                                                                                M output)

      Copy the contents of the matrix `input` to the matrix `output`, completely replacing all elements.
      Type Parameters:
        `M` - The precise type of matrix
        `T0` - A phantom type parameter
        `T1` - A phantom type parameter
      Parameters:
        `input` - The input vector
        `output` - The output vector
      Returns:
        `output`

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