public final class PMatrixM3x3D extends Object
A 3x3 mutable matrix type with double elements.
| Modifier and Type | Class and Description |
|---|---|
static class |
PMatrixM3x3D.ContextPM3D
The
ContextPM3D type contains the minimum storage required for
all of the functions of the PMatrixM3x3D class. |
| Modifier and Type | Method and Description |
|---|---|
static <T0,T1,M extends PMatrixWritable3x3DType<T0,T1>> |
copy(PMatrixReadable3x3DType<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 PMatrixWritable3x3DType<T1,T0>> |
invert(PMatrixM3x3D.ContextPM3D context,
PMatrixReadable3x3DType<T0,T1> m,
MOUT out)
Calculate the inverse of the matrix
m, saving the resulting matrix
to out. |
static <T0,T1,T2,MOUT extends PMatrixWritable3x3DType<T0,T2>> |
multiply(PMatrixReadable3x3DType<T1,T2> m0,
PMatrixReadable3x3DType<T0,T1> m1,
MOUT out)
Multiply the matrix
m0 with the matrix m1, writing the
result to out. |
static <T0,T1,V extends PVectorWritable3DType<T1>> |
multiplyVector3D(PMatrixM3x3D.ContextPM3D context,
PMatrixReadable3x3DType<T0,T1> m,
PVectorReadable3DType<T0> v,
V out)
Multiply the matrix
m with the vector v, writing the
resulting vector to out. |
public static <T0,T1,MOUT extends PMatrixWritable3x3DType<T1,T0>> boolean invert(PMatrixM3x3D.ContextPM3D context, PMatrixReadable3x3DType<T0,T1> m, MOUT out)
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.T0 - A phantom type parameterT1 - A phantom type parameterMOUT - The precise type of output matrixcontext - Preallocated storagem - The input matrixout - The output matrixtrue iff the matrix was invertibleMatrixM3x3D.determinant(com.io7m.jtensors.MatrixReadable3x3DType)public static <T0,T1,T2,MOUT extends PMatrixWritable3x3DType<T0,T2>> MOUT multiply(PMatrixReadable3x3DType<T1,T2> m0, PMatrixReadable3x3DType<T0,T1> m1, MOUT out)
m0 with the matrix m1, writing the
result to out.T0 - A phantom type parameterT1 - A phantom type parameterT2 - A phantom type parameterMOUT - The precise type of output matrixm0 - The left input vectorm1 - The right input vectorout - The output vectoroutpublic static <T0,T1,V extends PVectorWritable3DType<T1>> V multiplyVector3D(PMatrixM3x3D.ContextPM3D context, PMatrixReadable3x3DType<T0,T1> m, PVectorReadable3DType<T0> v, V out)
m with the vector v, writing the
resulting vector to out.T0 - A phantom type parameterT1 - A phantom type parameterV - The precise type of writable vectorcontext - Preallocated storagem - The input matrixv - The input vectorout - The output vectoroutpublic static <T0,T1,M extends PMatrixWritable3x3DType<T0,T1>> M copy(PMatrixReadable3x3DType<T0,T1> input, M output)
input to the matrix output,
completely replacing all elements.M - The precise type of matrixT0 - A phantom type parameterT1 - A phantom type parameterinput - The input vectoroutput - The output vectoroutputCopyright © 2017 <code@io7m.com> http://io7m.com