public class K2DMatrix
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
K2DTransform
,
Serializable
,
Serialized FormConstructor and Description |
---|
K2DMatrix()
This constructor builds an 3 by 3 identity matrix
|
K2DMatrix(double e00,
double e01,
double e02,
double e10,
double e11,
double e12,
double e20,
double e21,
double e22)
Constructs a 3 by 3 matrix with the specified values at the specified positions
in the matrix
|
K2DMatrix(K2DMatrix mat)
This constructor builds a matrix having the same values as the parameter matrix.
|
Modifier and Type | Method and Description |
---|---|
void |
applyIdentity()
Sets the matrix to the identity matrix.
|
void |
applyInverse()
This method inverses the matrix.
|
void |
applyTranspose()
This method applies the tranpose of the matrix meaning
Eij = Eji where Eij is the element of the matrix on the ith row and jth column
|
java.lang.Object |
clone()
Clones this K2DMatrix instance.
|
boolean |
equals(java.lang.Object obj) |
double |
getDeterminant()
This method calculates the determinant of the matrix.
|
K2DMatrix |
getInverse()
This method get the inverse of the matrix.
|
double |
getMatrixElement(int row,
int col)
Gets the value at the specified position in the matrix.
|
void |
multiply(K2DMatrix m)
Multiply this matrix with matrix m.
|
java.lang.String |
toString() |
public K2DMatrix()
public K2DMatrix(double e00, double e01, double e02, double e10, double e11, double e12, double e20, double e21, double e22)
e00
- value for position 0,0e01
- value for position 0,1e02
- value for position 0,2e10
- value for position 1,0e11
- value for position 1,1e12
- value for position 1,2e20
- value for position 2,0e21
- value for position 2,1e22
- value for position 2,2public K2DMatrix(K2DMatrix mat)
mat
- the original matrix to copypublic void applyIdentity()
public double getDeterminant()
public void applyTranspose()
public void applyInverse()
public K2DMatrix getInverse()
public void multiply(K2DMatrix m)
m
- to matrix that will be multipliedpublic java.lang.Object clone()
clone
in class java.lang.Object
public double getMatrixElement(int row, int col)
row
- the row position in the matrixcol
- the col position in the matrixpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object