All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.IntegerSquareMatrix

java.lang.Object
   |
   +----JSci.maths.Matrix
           |
           +----JSci.maths.IntegerMatrix
                   |
                   +----JSci.maths.IntegerSquareMatrix

public class IntegerSquareMatrix
extends IntegerMatrix
The IntegerSquareMatrix class provides an object for encapsulating square matrices containing integers.


Constructor Index

 o IntegerSquareMatrix()
Constructs a matrix.
 o IntegerSquareMatrix(int)
Constructs an empty matrix.
 o IntegerSquareMatrix(int[][])
Constructs a matrix by wrapping an array.
 o IntegerSquareMatrix(IntegerVector[])
Constructs a matrix from an array of vectors (columns).

Method Index

 o add(IntegerMatrix)
Returns the addition of this matrix and another.
 o add(IntegerSquareMatrix)
Returns the addition of this matrix and another.
 o choleskyDecomposition()
Returns the Cholesky decomposition of this matrix.
 o det()
Returns the determinant.
 o isSymmetric()
Returns true if this matrix is symmetric.
 o isUnitary()
Returns true if this matrix is unitary.
 o luDecompose()
Returns the LU decomposition of this matrix.
 o multiply(IntegerMatrix)
Returns the multiplication of this matrix and another.
 o multiply(IntegerSquareMatrix)
Returns the multiplication of this matrix and another.
 o multiply(IntegerVector)
Returns the multiplication of a vector by this matrix.
 o scalarMultiply(int)
Returns the multiplication of this matrix by a scalar.
 o subtract(IntegerMatrix)
Returns the subtraction of this matrix by another.
 o subtract(IntegerSquareMatrix)
Returns the subtraction of this matrix by another.
 o trace()
Returns the trace.
 o transpose()
Returns the transpose of this matrix.

Constructors

 o IntegerSquareMatrix
 protected IntegerSquareMatrix()
Constructs a matrix.

 o IntegerSquareMatrix
 public IntegerSquareMatrix(int size)
Constructs an empty matrix.

Parameters:
size - the number of rows/columns
 o IntegerSquareMatrix
 public IntegerSquareMatrix(int array[][])
Constructs a matrix by wrapping an array.

Parameters:
array - an assigned value
Throws: MatrixDimensionException
If the array is not square.
 o IntegerSquareMatrix
 public IntegerSquareMatrix(IntegerVector array[])
Constructs a matrix from an array of vectors (columns).

Parameters:
array - an assigned value

Methods

 o isSymmetric
 public boolean isSymmetric()
Returns true if this matrix is symmetric.

 o isUnitary
 public boolean isUnitary()
Returns true if this matrix is unitary.

 o det
 public int det()
Returns the determinant.

 o trace
 public int trace()
Returns the trace.

 o add
 public IntegerMatrix add(IntegerMatrix m)
Returns the addition of this matrix and another.

Parameters:
m - an integer matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
Overrides:
add in class IntegerMatrix
 o add
 public IntegerSquareMatrix add(IntegerSquareMatrix m)
Returns the addition of this matrix and another.

Parameters:
m - an integer square matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
 o subtract
 public IntegerMatrix subtract(IntegerMatrix m)
Returns the subtraction of this matrix by another.

Parameters:
m - an integer matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
Overrides:
subtract in class IntegerMatrix
 o subtract
 public IntegerSquareMatrix subtract(IntegerSquareMatrix m)
Returns the subtraction of this matrix by another.

Parameters:
m - an integer square matrix
Throws: MatrixDimensionException
If the matrices are different sizes.
 o scalarMultiply
 public IntegerMatrix scalarMultiply(int x)
Returns the multiplication of this matrix by a scalar.

Parameters:
x - an integer
Returns:
an integer square matrix
Overrides:
scalarMultiply in class IntegerMatrix
 o multiply
 public IntegerVector multiply(IntegerVector v)
Returns the multiplication of a vector by this matrix.

Parameters:
v - an integer vector
Throws: DimensionException
If the matrix and vector are incompatible.
Overrides:
multiply in class IntegerMatrix
 o multiply
 public IntegerMatrix multiply(IntegerMatrix m)
Returns the multiplication of this matrix and another.

Parameters:
m - an integer matrix
Throws: MatrixDimensionException
If the matrices are incompatible.
Overrides:
multiply in class IntegerMatrix
 o multiply
 public IntegerSquareMatrix multiply(IntegerSquareMatrix m)
Returns the multiplication of this matrix and another.

Parameters:
m - an integer square matrix
Throws: MatrixDimensionException
If the matrices are incompatible.
 o transpose
 public Matrix transpose()
Returns the transpose of this matrix.

Returns:
an integer square matrix
Overrides:
transpose in class IntegerMatrix
 o luDecompose
 public DoubleSquareMatrix[] luDecompose()
Returns the LU decomposition of this matrix.

Returns:
an array with [0] containing the L-matrix and [1] containing the U-matrix.
 o choleskyDecomposition
 public DoubleSquareMatrix[] choleskyDecomposition()
Returns the Cholesky decomposition of this matrix. Matrix must be symmetric and positive definite.

Returns:
an array with [0] containing the L-matrix and [1] containing the U-matrix.

All Packages  Class Hierarchy  This Package  Previous  Next  Index