|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJSci.maths.Matrix
JSci.maths.IntegerMatrix
JSci.maths.IntegerSquareMatrix
public class IntegerSquareMatrix
The IntegerSquareMatrix class provides an object for encapsulating square matrices containing integers.
| Field Summary | |
|---|---|
protected DoubleSquareMatrix[] |
LU
|
protected int[] |
LUpivot
|
| Fields inherited from class JSci.maths.IntegerMatrix |
|---|
ARRAY_2D, matrix |
| Fields inherited from class JSci.maths.Matrix |
|---|
CLASS_SPECIFIC, numCols, numRows, storageFormat |
| Constructor Summary | |
|---|---|
|
IntegerSquareMatrix(int size)
Constructs an empty matrix. |
|
IntegerSquareMatrix(int[][] array)
Constructs a matrix by wrapping an array. |
|
IntegerSquareMatrix(IntegerVector[] array)
Constructs a matrix from an array of vectors. |
protected |
IntegerSquareMatrix(int size,
int storeID)
Constructs a matrix. |
| Method Summary | |
|---|---|
IntegerMatrix |
add(IntegerMatrix m)
Returns the addition of this matrix and another. |
IntegerSquareMatrix |
add(IntegerSquareMatrix m)
Returns the addition of this matrix and another. |
DoubleSquareMatrix[] |
choleskyDecomposition()
Returns the Cholesky decomposition of this matrix. |
int |
det()
Returns the determinant. |
boolean |
isSymmetric()
Returns true if this matrix is symmetric. |
boolean |
isUnitary()
Returns true if this matrix is unitary. |
DoubleSquareMatrix[] |
luDecompose(int[] pivot)
Returns the LU decomposition of this matrix. |
IntegerSquareMatrix |
multiply(IntegerSquareMatrix m)
Returns the multiplication of this matrix and another. |
IntegerVector |
multiply(IntegerVector v)
Returns the multiplication of a vector by this matrix. |
IntegerMatrix |
scalarMultiply(int x)
Returns the multiplication of this matrix by a scalar. |
IntegerMatrix |
subtract(IntegerMatrix m)
Returns the subtraction of this matrix by another. |
IntegerSquareMatrix |
subtract(IntegerSquareMatrix m)
Returns the subtraction of this matrix by another. |
int |
trace()
Returns the trace. |
Matrix |
transpose()
Returns the transpose of this matrix. |
| Methods inherited from class JSci.maths.IntegerMatrix |
|---|
add, equals, finalize, frobeniusNorm, getElement, hashCode, infNorm, multiply, multiply, negate, scalarDivide, scalarMultiply, setElement, subtract, toComplexMatrix, toDoubleMatrix, toString |
| Methods inherited from class JSci.maths.Matrix |
|---|
columns, getInvalidElementMsg, rows |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient DoubleSquareMatrix[] LU
protected transient int[] LUpivot
| Constructor Detail |
|---|
protected IntegerSquareMatrix(int size,
int storeID)
public IntegerSquareMatrix(int size)
size - the number of rows/columns.public IntegerSquareMatrix(int[][] array)
array - an assigned value.
MatrixDimensionException - If the array is not square.public IntegerSquareMatrix(IntegerVector[] array)
array - an assigned value.| Method Detail |
|---|
public boolean isSymmetric()
public boolean isUnitary()
public int det()
public int trace()
public IntegerMatrix add(IntegerMatrix m)
add in class IntegerMatrixm - an integer matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix add(IntegerSquareMatrix m)
m - an integer square matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerMatrix subtract(IntegerMatrix m)
subtract in class IntegerMatrixm - an integer matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix subtract(IntegerSquareMatrix m)
m - an integer square matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerMatrix scalarMultiply(int x)
scalarMultiply in class IntegerMatrixx - an integer
public IntegerVector multiply(IntegerVector v)
multiply in class IntegerMatrixv - an integer vector
DimensionException - If the matrix and vector are incompatible.public IntegerSquareMatrix multiply(IntegerSquareMatrix m)
m - an integer square matrix
MatrixDimensionException - If the matrices are incompatible.public Matrix transpose()
transpose in class IntegerMatrixpublic DoubleSquareMatrix[] luDecompose(int[] pivot)
pivot - an empty array of length the number of rows
to hold the pivot information (null if not interested).
The last array element will contain the parity.
public DoubleSquareMatrix[] choleskyDecomposition()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||