|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--gov.sns.tools.math.r3.R3x3
Represents an element of R3x3, the set of real 3x3 matrices. The class a set of the usual matrix operations and linear transforms on R3 represented by the matrix.
Matrix,
R3,
Serialized Form| Field Summary | |
static int |
DIM
number of dimensions (DIM=3) |
static int |
IND_X
index of x position |
static int |
IND_Y
index of y position |
static int |
IND_Z
index of z position |
| Constructor Summary | |
R3x3()
Creates a new instance of R3x3 initialized to zero. |
|
R3x3(R3x3 matInit)
Copy Constructor - create a deep copy of the target matrix. |
|
R3x3(java.lang.String strTokens)
Parsing Constructor - create a R3x3 instance and initialize it according to a token string of element values. |
|
| Method Summary | |
R3x3 |
conjugateInv(R3x3 matPhi)
Function for inverse conjugation of this matrix by the argument matrix. |
R3x3 |
conjugateTrans(R3x3 matPhi)
Function for transpose conjugation of this matrix by the argument matrix. |
double |
det()
Matrix determinant function. |
R3x3EigenDecomposition |
eigenDecomposition()
Perform an eigenvalue decomposition of this matrix. |
boolean |
equals(java.lang.Object o)
Return true if this object is equal to o, false otherwise. |
double |
getElem(int i,
int j)
Return matrix element value. |
int |
hashCode()
"Borrowed" implementation from AffineTransform, since it is based on double attribute values. |
static R3x3 |
identity()
Create an identity matrix |
R3x3 |
inverse()
Nondestructive inverse of this matrix. |
boolean |
isSymmetric()
Check if matrix is symmetric. |
static void |
main(java.lang.String[] arrArgs)
Testing Driver |
R3x3 |
minus(R3x3 mat)
Nondestructive matrix subtraction. |
void |
minusEquals(R3x3 mat)
In-place matrix subtraction. |
double |
norm1()
Return the l1 norm of this matrix. |
double |
norm2()
Return the l2 norm of this matrix |
double |
normInf()
Return the l-infinity norm of this matrix |
static R3x3 |
parse(java.lang.String strTokens)
Create a R3x3 instance and initialize it according to a token string of element values. |
R3x3 |
plus(R3x3 mat)
Nondestructive matrix addition. |
void |
plusEquals(R3x3 mat)
In-place matrix addition. |
void |
print(java.io.PrintWriter os)
Print out the contents of the R3x3 in text format. |
void |
setElem(int i,
int j,
double s)
Element assignment - assigns matrix element to the specified value |
void |
setSubMatrix(int i0,
int i1,
int j0,
int j1,
double[][] arrSub)
Set a submatrix within the phase matrix. |
R3x3 |
times(double s)
Nondestructive scalar multiplication. |
R3 |
times(R3 vec)
Nondestructive Matrix-Vector multiplication. |
R3x3 |
times(R3x3 matRight)
Matrix multiplication. |
void |
timesEquals(double s)
In-place scalar multiplication. |
void |
timesEquals(R3x3 matRight)
In-place matrix multiplication. |
java.lang.String |
toString()
Convert the contents of the matrix to a string representation. |
R3x3 |
transpose()
Nondestructive transpose of this matrix. |
static R3x3 |
zero()
Create a new instance of a zero matrix. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int IND_X
public static final int IND_Y
public static final int IND_Z
public static final int DIM
| Constructor Detail |
public R3x3()
public R3x3(R3x3 matInit)
matInit - initial value
public R3x3(java.lang.String strTokens)
throws java.lang.IllegalArgumentException,
java.lang.NumberFormatException
strTokens - token vector of 7x7=49 numeric values
java.lang.IllegalArgumentException - wrong number of token strings
java.lang.NumberFormatException - bad number format, unparseable| Method Detail |
public static R3x3 zero()
public static R3x3 identity()
public static R3x3 parse(java.lang.String strTokens)
throws java.lang.IllegalArgumentException,
java.lang.NumberFormatException
strTokens - token vector of 3x3=9 numeric values
java.lang.IllegalArgumentException - wrong number of token strings
java.lang.NumberFormatException - bad number format, unparseable
public double getElem(int i,
int j)
throws java.lang.ArrayIndexOutOfBoundsException
i - row indexj - column index
java.lang.ArrayIndexOutOfBoundsException - index must be in {0,1,2}
public void setElem(int i,
int j,
double s)
throws java.lang.ArrayIndexOutOfBoundsException
i - row indexj - column index
java.lang.ArrayIndexOutOfBoundsException - index must be in {0,1,2}
public void setSubMatrix(int i0,
int i1,
int j0,
int j1,
double[][] arrSub)
throws java.lang.ArrayIndexOutOfBoundsException
i0 - row index of upper left blocki1 - row index of lower right blockj0 - column index of upper left blockj1 - column index of lower right blockarrSub - two-dimensional sub element array
java.lang.ArrayIndexOutOfBoundsException - submatrix does not fit into 3x3 matrixpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
Object.
hashCode in class java.lang.Objectpublic boolean isSymmetric()
public double det()
public R3x3 transpose()
public R3x3 inverse()
public R3x3EigenDecomposition eigenDecomposition()
public R3x3 plus(R3x3 mat)
mat - matrix to be added to this
public void plusEquals(R3x3 mat)
mat - matrix to be added to this (result replaces this)public R3x3 minus(R3x3 mat)
mat - matrix to be subtracted from this
public void minusEquals(R3x3 mat)
mat - matrix to be subtracted from this (result replaces this)public R3x3 times(double s)
s - scalar value to multiply this matrix
public void timesEquals(double s)
s - scalar value to multiply this matrix (result replaces this)public R3 times(R3 vec)
public R3x3 times(R3x3 matRight)
matRight - right operand of matrix multiplication operator
public void timesEquals(R3x3 matRight)
matRight - right operand of matrix multiplication operator
public R3x3 conjugateTrans(R3x3 matPhi)
matPhi - conjugating matrix (typically a tranfer matrix)
public R3x3 conjugateInv(R3x3 matPhi)
matPhi - conjugating matrix (typically a tranfer matrix)
public double norm1()
public double norm2()
public double normInf()
public java.lang.String toString()
toString in class java.lang.Objectpublic void print(java.io.PrintWriter os)
os - output stream to receive text dumppublic static void main(java.lang.String[] arrArgs)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||