mpicbg.util

## Class Matrix3x3

• ```public final class Matrix3x3
extends Object```
Basic operations on 3x3 float matrices.
``` m00 m01 m02
m10 m11 m12
m20 m21 m22
```
The class provides most of the methods as static variants for matrices passed as float[]. They are always meant to be in a row after row sequence:
``` m00, m01, m02, m10, m11, m12, m20, m21, m22
```
• ### Field Summary

Fields
Modifier and Type Field and Description
`float` `m00`
`float` `m01`
`float` `m02`
`float` `m10`
`float` `m11`
`float` `m12`
`float` `m20`
`float` `m21`
`float` `m22`
• ### Constructor Summary

Constructors
Constructor and Description
`Matrix3x3()`
Initialize and identity matrix.
`Matrix3x3(float[] m)`
Initialize a matrix with a float[].
```Matrix3x3(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)```
Initialize a matrix.
• ### Method Summary

Methods
Modifier and Type Method and Description
`Matrix3x3` `clone()`
`void` `concatenate(Matrix3x3 m)`
Concatenate a matrix: this = this × m
`static float[]` ```createInverse(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)```
`float` `det()`
Calculate the determinant.
`static float` `det(float[] a)`
Calculate the determinant of a matrix given as a float[] (row after row).
`static float` ```det(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)```
Calculate the determinant of a matrix given by values.
`void` `invert()`
`static void` `invert(float[] m)`
`void` `preConcatenate(Matrix3x3 m)`
Pre-concatenate a matrix: this = m × this
`void` `reset()`
Set to identity.
`void` `set(Matrix3x3 m)`
• ### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### m00

`public float m00`
• #### m01

`public float m01`
• #### m02

`public float m02`
• #### m10

`public float m10`
• #### m11

`public float m11`
• #### m12

`public float m12`
• #### m20

`public float m20`
• #### m21

`public float m21`
• #### m22

`public float m22`
• ### Constructor Detail

• #### Matrix3x3

`public Matrix3x3()`
Initialize and identity matrix.
• #### Matrix3x3

```public Matrix3x3(float m00,
float m01,
float m02,
float m10,
float m11,
float m12,
float m20,
float m21,
float m22)```
Initialize a matrix.
Parameters:
`m00` -
`m01` -
`m02` -
`m10` -
`m11` -
`m12` -
`m20` -
`m21` -
`m22` -
• #### Matrix3x3

`public Matrix3x3(float[] m)`
Initialize a matrix with a float[]. Note that the float[] elements do not reflect the content of the matrix when performing operations. They are just used to initialize it. For performing operations on the float[] directly, use the static methods of `Matrix3x3`.
Parameters:
`m` -
• ### Method Detail

• #### det

`public final float det()`
Calculate the determinant.
Returns:
determinant
• #### det

`public static final float det(float[] a)`
Calculate the determinant of a matrix given as a float[] (row after row).
Parameters:
`a` - matrix given row by row
Returns:
determinant
• #### det

```public static final float det(float m00,
float m01,
float m02,
float m10,
float m11,
float m12,
float m20,
float m21,
float m22)```
Calculate the determinant of a matrix given by values.
Parameters:
`m00` -
`m01` -
`m02` -
`m10` -
`m11` -
`m12` -
`m20` -
`m21` -
`m22` -
Returns:
• #### invert

```public final void invert()
throws NoninvertibleModelException```
Throws:
`NoninvertibleModelException`
• #### invert

```public static final void invert(float[] m)
throws NoninvertibleModelException```
Throws:
`NoninvertibleModelException`
• #### createInverse

```public static final float[] createInverse(float m00,
float m01,
float m02,
float m10,
float m11,
float m12,
float m20,
float m21,
float m22)
throws NoninvertibleModelException```
Throws:
`NoninvertibleModelException`
• #### concatenate

`public final void concatenate(Matrix3x3 m)`
Concatenate a matrix: this = this × m
Parameters:
`m` -
• #### preConcatenate

`public final void preConcatenate(Matrix3x3 m)`
Pre-concatenate a matrix: this = m × this
Parameters:
`m` -
• #### set

`public final void set(Matrix3x3 m)`
• #### reset

`public final void reset()`
Set to identity.
• #### clone

`public final Matrix3x3 clone()`
Overrides:
`clone` in class `Object`