- Object
-
- Matrix33
-
-
Field Summary
Fields Modifier and Type Field Description double
m00
The element at 0,0double
m01
The element at 0,1double
m02
The element at 0,2double
m10
The element at 1,0double
m11
The element at 1,1double
m12
The element at 1,2double
m20
The element at 2,0double
m21
The element at 2,1double
m22
The element at 2,2
-
Constructor Summary
Constructors Constructor Description Matrix33()
Default constructor.Matrix33(double[] values)
Full constructor.Matrix33(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
Full constructor.Matrix33(Matrix33 matrix)
Copy constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Matrix33
add(Matrix33 matrix)
Matrix33
copy()
Returns a deep copy of this object.double
determinant()
Returns the determinant of thisMatrix33
.Matrix33
difference(Matrix33 matrix)
boolean
equals(Object obj)
Matrix33
getInverse()
Matrix33
getTranspose()
int
hashCode()
Matrix33
identity()
Matrix33
invert()
Matrix33
multiply(double scalar)
Matrix33
multiply(Matrix33 matrix)
Vector3
multiply(Vector3 vector)
Vector3
multiplyT(Vector3 vector)
Matrix33
product(double scalar)
Matrix33
product(Matrix33 matrix)
Vector3
product(Vector3 vector)
Vector3
productT(Vector3 vector)
Vector2
solve22(Vector2 b)
Solves the system of linear equations:Vector3
solve33(Vector3 b)
Solves the system of linear equations:Matrix33
subtract(Matrix33 matrix)
Matrix33
sum(Matrix33 matrix)
String
toString()
Matrix33
transpose()
-
-
-
Field Detail
-
m00
public double m00
The element at 0,0
-
m01
public double m01
The element at 0,1
-
m02
public double m02
The element at 0,2
-
m10
public double m10
The element at 1,0
-
m11
public double m11
The element at 1,1
-
m12
public double m12
The element at 1,2
-
m20
public double m20
The element at 2,0
-
m21
public double m21
The element at 2,1
-
m22
public double m22
The element at 2,2
-
-
Constructor Detail
-
Matrix33
public Matrix33()
Default constructor.
-
Matrix33
public Matrix33(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
Full constructor.- Parameters:
m00
- the element at 0,0m01
- the element at 0,1m02
- the element at 0,2m10
- the element at 1,0m11
- the element at 1,1m12
- the element at 1,2m20
- the element at 2,0m21
- the element at 2,1m22
- the element at 2,2
-
Matrix33
public Matrix33(double[] values)
Full constructor.The given array should be in the same order as the
Matrix33(double, double, double, double, double, double, double, double, double)
constructor.- Parameters:
values
- the values array- Throws:
NullPointerException
- if values is nullIllegalArgumentException
- if values is not length 9
-
-
Method Detail
-
copy
public Matrix33 copy()
Description copied from interface:Copyable
Returns a deep copy of this object.
-
multiply
public Matrix33 multiply(double scalar)
Multiplies thisMatrix33
by the given scalar and places the result in thisMatrix33
.this = this * scalar
- Parameters:
scalar
- the scalar to multiply by- Returns:
Matrix33
this matrix
-
product
public Matrix33 product(double scalar)
Multiplies thisMatrix33
by the given scalar returning a newMatrix33
containing the result.r = this * scalar
- Parameters:
scalar
- the scalar to multiply by- Returns:
Matrix33
a new matrix containing the result
-
determinant
public double determinant()
Returns the determinant of thisMatrix33
.- Returns:
- double
-
solve33
public Vector3 solve33(Vector3 b)
Solves the system of linear equations:Ax = b Multiply by A-1 on both sides x = A-1b
-
-