|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJSci.maths.matrices.Matrix
JSci.maths.matrices.AbstractIntegerMatrix
JSci.maths.matrices.AbstractIntegerSquareMatrix
JSci.maths.matrices.IntegerSquareMatrix
The IntegerSquareMatrix class provides an object for encapsulating integer square matrices.
| Field Summary | |
protected int[][] |
matrix
Array containing the elements of the matrix. |
| Fields inherited from class JSci.maths.matrices.AbstractIntegerSquareMatrix |
LU, LUpivot |
| Fields inherited from class JSci.maths.matrices.Matrix |
numCols, numRows |
| Constructor Summary | |
IntegerSquareMatrix(AbstractIntegerVector[] array)
Constructs a matrix from an array of vectors (columns). |
|
IntegerSquareMatrix(int size)
Constructs an empty matrix. |
|
IntegerSquareMatrix(int[][] array)
Constructs a matrix by wrapping an array. |
|
| Method Summary | |
AbstractIntegerSquareMatrix |
add(AbstractIntegerSquareMatrix m)
Returns the addition of this matrix and another. |
IntegerSquareMatrix |
add(IntegerSquareMatrix m)
|
AbstractDoubleSquareMatrix[] |
choleskyDecompose()
Returns the Cholesky decomposition of this matrix. |
int |
det()
Returns the determinant. |
AbstractIntegerSquareMatrix |
directSum(AbstractIntegerSquareMatrix m)
Returns the direct sum of this matrix and another. |
boolean |
equals(AbstractIntegerMatrix m)
Compares two ${nativeTyp} matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius or Hilbert-Schmidt (l2) norm. |
int |
getElement(int i,
int j)
Returns an element of the matrix. |
int |
infNorm()
Returns the l -norm. |
AbstractDoubleSquareMatrix |
inverse()
Returns the inverse of this matrix. |
AbstractDoubleSquareMatrix[] |
luDecompose(int[] pivot)
Returns the LU decomposition of this matrix. |
AbstractIntegerSquareMatrix |
multiply(AbstractIntegerSquareMatrix m)
Returns the multiplication of this matrix and another. |
AbstractIntegerVector |
multiply(AbstractIntegerVector v)
Returns the multiplication of a vector by this matrix. |
IntegerSquareMatrix |
multiply(IntegerSquareMatrix m)
|
AbelianGroup.Member |
negate()
Returns the negative of this matrix. |
AbstractDoubleSquareMatrix[] |
qrDecompose()
Returns the QR decomposition of this matrix. |
AbstractIntegerMatrix |
scalarMultiply(int x)
Returns the multiplication of this matrix by a scalar. |
int |
scalarProduct(AbstractIntegerSquareMatrix m)
Returns the scalar product of this matrix and another. |
int |
scalarProduct(IntegerSquareMatrix m)
|
void |
setElement(int i,
int j,
int x)
Sets the value of an element of the matrix. |
AbstractDoubleSquareMatrix[] |
singularValueDecompose()
Returns the singular value decomposition of this matrix. |
AbstractIntegerSquareMatrix |
subtract(AbstractIntegerSquareMatrix m)
Returns the subtraction of this matrix by another. |
IntegerSquareMatrix |
subtract(IntegerSquareMatrix m)
|
AbstractIntegerSquareMatrix |
tensor(AbstractIntegerSquareMatrix m)
Returns the tensor product of this matrix and another. |
AbstractComplexMatrix |
toComplexMatrix()
Converts this matrix to a complex matrix. |
AbstractDoubleMatrix |
toDoubleMatrix()
Converts this matrix to a double matrix. |
java.lang.String |
toString()
Returns a string representing this matrix. |
int |
trace()
Returns the trace. |
Matrix |
transpose()
Returns the transpose of this matrix. |
| Methods inherited from class JSci.maths.matrices.AbstractIntegerSquareMatrix |
add, isSymmetric, isUnitary, scalarProduct, subtract |
| Methods inherited from class JSci.maths.matrices.AbstractIntegerMatrix |
add, directSum, equals, hashCode, multiply, multiply, scalarDivide, scalarMultiply, subtract, tensor |
| Methods inherited from class JSci.maths.matrices.Matrix |
columns, getInvalidElementMsg, rows |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final int[][] matrix
| Constructor Detail |
public IntegerSquareMatrix(int[][] array)
array - an assigned valuepublic IntegerSquareMatrix(int size)
public IntegerSquareMatrix(AbstractIntegerVector[] array)
array - an assigned value| Method Detail |
public boolean equals(AbstractIntegerMatrix m)
equals in class AbstractIntegerMatrixm - a int matrixpublic java.lang.String toString()
toString in class AbstractIntegerMatrixpublic AbstractDoubleMatrix toDoubleMatrix()
toDoubleMatrix in class AbstractIntegerSquareMatrixpublic AbstractComplexMatrix toComplexMatrix()
toComplexMatrix in class AbstractIntegerSquareMatrix
public int getElement(int i,
int j)
getElement in class AbstractIntegerMatrixi - row index of the elementj - column index of the element
MatrixDimensionException - If attempting to access an invalid element.
public void setElement(int i,
int j,
int x)
setElement in class AbstractIntegerMatrixi - row index of the elementj - column index of the elementx - a number
MatrixDimensionException - If attempting to access an invalid element.public int infNorm()
-norm.
infNorm in class AbstractIntegerMatrixpublic double frobeniusNorm()
frobeniusNorm in class AbstractIntegerMatrixpublic int det()
det in class AbstractIntegerSquareMatrixpublic int trace()
trace in class AbstractIntegerSquareMatrixpublic AbelianGroup.Member negate()
negate in interface AbelianGroup.Membernegate in class AbstractIntegerSquareMatrixpublic AbstractIntegerSquareMatrix add(AbstractIntegerSquareMatrix m)
add in class AbstractIntegerSquareMatrixm - a int matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix add(IntegerSquareMatrix m)
public AbstractIntegerSquareMatrix subtract(AbstractIntegerSquareMatrix m)
subtract in class AbstractIntegerSquareMatrixm - a int matrix
MatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix subtract(IntegerSquareMatrix m)
public AbstractIntegerMatrix scalarMultiply(int x)
scalarMultiply in class AbstractIntegerSquareMatrixx - a int.
public int scalarProduct(AbstractIntegerSquareMatrix m)
scalarProduct in class AbstractIntegerSquareMatrixm - a int matrix.
MatrixDimensionException - If the matrices are different sizes.public int scalarProduct(IntegerSquareMatrix m)
public AbstractIntegerVector multiply(AbstractIntegerVector v)
multiply in class AbstractIntegerMatrixv - a int vector.
DimensionException - If the matrix and vector are incompatible.public AbstractIntegerSquareMatrix multiply(AbstractIntegerSquareMatrix m)
multiply in class AbstractIntegerSquareMatrixm - a int matrix
MatrixDimensionException - If the matrices are incompatible.public IntegerSquareMatrix multiply(IntegerSquareMatrix m)
public AbstractIntegerSquareMatrix directSum(AbstractIntegerSquareMatrix m)
directSum in class AbstractIntegerSquareMatrixpublic AbstractIntegerSquareMatrix tensor(AbstractIntegerSquareMatrix m)
tensor in class AbstractIntegerSquareMatrixpublic Matrix transpose()
transpose in class AbstractIntegerSquareMatrixpublic AbstractDoubleSquareMatrix inverse()
inverse in class AbstractIntegerSquareMatrixpublic final AbstractDoubleSquareMatrix[] luDecompose(int[] pivot)
luDecompose in class AbstractIntegerSquareMatrixpivot - an empty array of length rows()+1
to hold the pivot information (null if not interested).
The last array element will contain the parity.
public AbstractDoubleSquareMatrix[] choleskyDecompose()
choleskyDecompose in class AbstractIntegerSquareMatrixpublic AbstractDoubleSquareMatrix[] qrDecompose()
qrDecompose in class AbstractIntegerSquareMatrixpublic AbstractDoubleSquareMatrix[] singularValueDecompose()
singularValueDecompose in class AbstractIntegerSquareMatrix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||