|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--jumbo.euclid.Status
|
+--jumbo.euclid.IntMatrix
|
+--jumbo.euclid.IntSquareMatrix
IntSquareMatrix - square matrix class
IntSquareMatrix 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.IntMatrix |
cols,
flmat,
rows |
| Constructor Summary | |
IntSquareMatrix()
This gives a default matrix, with cols = rows = 0. |
|
IntSquareMatrix(int rows)
This gives a null matrix |
|
IntSquareMatrix(int[][] matrix)
form from a Java 2-D array (it holds row and column count) |
|
IntSquareMatrix(int rows,
int f)
initalises all elements in the array with a given int[] |
|
IntSquareMatrix(int rows,
int[] array)
Formed by feeding in an existing array to a colsXcols matrix. |
|
IntSquareMatrix(IntMatrix m)
assign a IntMatrix - i.e. |
|
IntSquareMatrix(IntMatrix m,
int lowrow,
int lowcol,
int rows)
submatrix of another matrix |
|
IntSquareMatrix(IntSquareMatrix m)
|
|
| Method Summary | |
IntSquareMatrix |
copyLowerToUpper()
copy lower triangle into upper triangle (i.e. |
IntSquareMatrix |
copyUpperToLower()
copy upper triangle into lower triangle (i.e. |
int |
determinant()
determinant - only goes up to order 3 at present :-( |
static IntSquareMatrix |
diagonal(IntArray f)
make diagonal matrix |
boolean |
equals(IntSquareMatrix r)
are two matrices identical? |
boolean |
isLowerTriangular()
is matrix lower triangular (including diagonal)? |
boolean |
isSymmetric()
is matrix symmetric? |
boolean |
isUnit()
is it a unit matrix? |
boolean |
isUpperTriangular()
is matrix UpperTriangular? |
IntArray |
lowerTriangle()
copy lower triangle into linear array; order: 0,0; 1,0; 1,1; 2,0 .. |
IntSquareMatrix |
multiply(IntSquareMatrix m)
matrix multiplication - multiplies conformable matrices; result is this*m |
static IntSquareMatrix |
outerProduct(IntArray f)
special types of matrix (Outerproduct, Diagonal, etc) |
IntSquareMatrix |
plus(IntSquareMatrix m)
matrix addition - adds conformable matrices |
void |
shallowCopy(IntSquareMatrix m)
shallowCopy an existing object |
IntSquareMatrix |
subtract(IntSquareMatrix m)
matrix subtraction - subtracts conformable matrices |
int |
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 IntSquareMatrix()
public IntSquareMatrix(int rows)
public IntSquareMatrix(int rows,
int[] array)
throws BadArgumentException
public IntSquareMatrix(int rows,
int f)
public IntSquareMatrix(IntMatrix m,
int lowrow,
int lowcol,
int rows)
throws BadArgumentException
public IntSquareMatrix(IntSquareMatrix m)
public IntSquareMatrix(IntMatrix m)
throws NonSquareException
public IntSquareMatrix(int[][] matrix)
throws MatrixShapeException
| Method Detail |
public static IntSquareMatrix outerProduct(IntArray f)
public static IntSquareMatrix diagonal(IntArray f)
public void shallowCopy(IntSquareMatrix m)
throws UnequalMatricesException
public boolean equals(IntSquareMatrix r)
throws UnequalMatricesException
public IntSquareMatrix plus(IntSquareMatrix m)
throws MatrixShapeException
public IntSquareMatrix subtract(IntSquareMatrix m)
throws MatrixShapeException
public IntSquareMatrix multiply(IntSquareMatrix m)
throws MatrixShapeException
public int determinant()
throws UnimplementedException
public int trace()
public boolean isUnit()
public boolean isSymmetric()
public boolean isUpperTriangular()
public boolean isLowerTriangular()
public IntSquareMatrix copyUpperToLower()
public IntSquareMatrix copyLowerToUpper()
public IntArray lowerTriangle()
public void transpose()
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||