public class IntegerSquareMatrix extends IntegerMatrix
| Modifier and Type | Field and Description |
|---|---|
protected DoubleSquareMatrix[] |
LU |
protected int[] |
LUpivot |
ARRAY_2D, matrixCLASS_SPECIFIC, numCols, numRows, storageFormat| Modifier | Constructor and Description |
|---|---|
|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
add, equals, finalize, frobeniusNorm, getElement, hashCode, infNorm, multiply, multiply, negate, scalarDivide, scalarMultiply, setElement, subtract, toComplexMatrix, toDoubleMatrix, toStringcolumns, getInvalidElementMsg, rowsprotected transient DoubleSquareMatrix[] LU
protected transient int[] LUpivot
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.public boolean isSymmetric()
public boolean isUnitary()
public int det()
public int trace()
public IntegerMatrix add(IntegerMatrix m)
add in class IntegerMatrixm - an integer matrixMatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix add(IntegerSquareMatrix m)
m - an integer square matrixMatrixDimensionException - If the matrices are different sizes.public IntegerMatrix subtract(IntegerMatrix m)
subtract in class IntegerMatrixm - an integer matrixMatrixDimensionException - If the matrices are different sizes.public IntegerSquareMatrix subtract(IntegerSquareMatrix m)
m - an integer square matrixMatrixDimensionException - If the matrices are different sizes.public IntegerMatrix scalarMultiply(int x)
scalarMultiply in class IntegerMatrixx - an integerpublic IntegerVector multiply(IntegerVector v)
multiply in class IntegerMatrixv - an integer vectorDimensionException - If the matrix and vector are incompatible.public IntegerSquareMatrix multiply(IntegerSquareMatrix m)
m - an integer square matrixMatrixDimensionException - 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()