|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--jumbo.euclid.Status
|
+--jumbo.euclid.RealMatrix
|
+--jumbo.euclid.RealSquareMatrix
RealSquareMatrix - square matrix class
RealSquareMatrix represents a square m-x-m matrix. The basic matrix algebra for square matrices is represented here Check out the exciting member functions, which are supported by Exceptions where appropriate. (NB. No attempt has been made to provide numerical robustness and inversion, diagonalisation, etc are as you find them.)
| Fields inherited from class jumbo.euclid.RealMatrix |
cols,
flmat,
rows |
| Constructor Summary | |
RealSquareMatrix()
This gives a default matrix, with cols = rows = 0. |
|
RealSquareMatrix(double[][] matrix)
form from a Java 2-D array (it holds row and column count) |
|
RealSquareMatrix(int rows)
This gives a null matrix |
|
RealSquareMatrix(int rows,
double f)
initalises all elements in the array with a given double[] |
|
RealSquareMatrix(int rows,
double[] array)
Formed by feeding in an existing array to a colsXcols matrix. |
|
RealSquareMatrix(RealMatrix m)
assign a RealMatrix - i.e. |
|
RealSquareMatrix(RealMatrix m,
int lowrow,
int lowcol,
int rows)
submatrix of another matrix |
|
RealSquareMatrix(RealSquareMatrix m)
|
|
| Method Summary | |
RealSquareMatrix |
copyLowerToUpper()
copy lower triangle into upper triangle (i.e. |
RealSquareMatrix |
copyUpperToLower()
copy upper triangle into lower triangle (i.e. |
double |
determinant()
determinant - only goes up to order 3 at present :-( |
static RealSquareMatrix |
diagonal(RealArray f)
make diagonal matrix |
int |
diagonaliseAndReturnRank(RealArray eigenvalues,
RealSquareMatrix eigenvectors,
IllCondMatrixException illCond)
diagonalisation - returns eigenvalues and vectors as MODIFIED arguments; this is NOT affected |
boolean |
equals(RealSquareMatrix r)
are two matrices identical? |
RealSquareMatrix |
getInverse()
inversion of matrix - creates NEW matrix |
boolean |
isImproperRotation()
is matrix an improper rotation? |
boolean |
isLowerTriangular()
is matrix lower triangular (including diagonal)? |
boolean |
isOrthogonal()
is matrix orthogonal? (rowwise calculation) |
boolean |
isOrthonormal()
is matrix unitary (orthonormal)? (synonym for isUnitary()) |
boolean |
isSymmetric()
is matrix symmetric? |
boolean |
isUnit()
is it a unit matrix? |
boolean |
isUnitary()
|
boolean |
isUpperTriangular()
is matrix UpperTriangular? |
RealArray |
lowerTriangle()
copy lower triangle into linear array; order: 0,0; 1,0; 1,1; 2,0 .. |
static void |
main(java.lang.String[] args)
tests RealSquareMatrix routines |
RealSquareMatrix |
multiply(RealSquareMatrix m)
matrix multiplication - multiplies conformable matrices; result is this*m |
void |
orthogonalise()
orthogonalise matrix (only works for 3x3 at present); MODIFIES matrix |
RealSquareMatrix |
orthonormalise()
orthonormalise matrix (only works for 3x3 at present) |
static RealSquareMatrix |
outerProduct(RealArray f)
special types of matrix (Outerproduct, Diagonal, etc) |
RealSquareMatrix |
plus(RealSquareMatrix m)
matrix addition - adds conformable matrices |
void |
shallowCopy(RealSquareMatrix m)
shallowCopy an existing object |
RealSquareMatrix |
subtract(RealSquareMatrix m)
matrix subtraction - subtracts conformable matrices |
double |
trace()
trace |
void |
transpose()
transpose - MODIFIES matrix |
| Methods inherited from class jumbo.euclid.Status |
NYI |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public RealSquareMatrix()
public RealSquareMatrix(int rows)
public RealSquareMatrix(int rows,
double[] array)
throws BadArgumentException
public RealSquareMatrix(int rows,
double f)
public RealSquareMatrix(RealMatrix m,
int lowrow,
int lowcol,
int rows)
throws BadArgumentException
public RealSquareMatrix(RealSquareMatrix m)
public RealSquareMatrix(RealMatrix m)
throws NonSquareException
public RealSquareMatrix(double[][] matrix)
throws MatrixShapeException
| Method Detail |
public static RealSquareMatrix outerProduct(RealArray f)
public static RealSquareMatrix diagonal(RealArray f)
public void shallowCopy(RealSquareMatrix m)
throws UnequalMatricesException
public boolean equals(RealSquareMatrix r)
throws UnequalMatricesException
public RealSquareMatrix plus(RealSquareMatrix m)
throws MatrixShapeException
public RealSquareMatrix subtract(RealSquareMatrix m)
throws MatrixShapeException
public RealSquareMatrix multiply(RealSquareMatrix m)
throws MatrixShapeException
public double determinant()
throws UnimplementedException
public double trace()
public boolean isUnit()
public boolean isSymmetric()
public RealSquareMatrix orthonormalise()
throws UnimplementedException
public boolean isOrthonormal()
public boolean isUpperTriangular()
public boolean isLowerTriangular()
public boolean isOrthogonal()
public boolean isImproperRotation()
public boolean isUnitary()
public RealSquareMatrix copyUpperToLower()
public RealSquareMatrix copyLowerToUpper()
public RealArray lowerTriangle()
public void transpose()
public int diagonaliseAndReturnRank(RealArray eigenvalues,
RealSquareMatrix eigenvectors,
IllCondMatrixException illCond)
throws ArrayTooSmallException
Note that IllCondMatrixException is RETURNED and not thrown
public void orthogonalise()
throws UnimplementedException
public RealSquareMatrix getInverse()
throws SingMatrixException
public static void main(java.lang.String[] args)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||