    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.

##

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

##

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

##

IntegerSquareMatrix

     protected IntegerSquareMatrix()

  Constructs a matrix.

IntegerSquareMatrix

     public IntegerSquareMatrix(int size)

  Constructs an empty matrix.

  Parameters:
    size - the number of rows/columns

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.

IntegerSquareMatrix

     public IntegerSquareMatrix(IntegerVector array[])

  Constructs a matrix from an array of vectors (columns).

  Parameters:
    array - an assigned value

##

isSymmetric

     public boolean isSymmetric()

  Returns true if this matrix is symmetric.

isUnitary

     public boolean isUnitary()

  Returns true if this matrix is unitary.

det

     public int det()

  Returns the determinant.

trace

     public int trace()

  Returns the trace.

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

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.

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

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.

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

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

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

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.

transpose

     public Matrix transpose()

  Returns the transpose of this matrix.

  Returns:
    an integer square matrix
  Overrides:
    transpose in class IntegerMatrix

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.

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