    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class JSci.maths.ComplexSquareMatrix

    java.lang.Object
       |
       +----JSci.maths.Matrix
               |
               +----JSci.maths.ComplexMatrix
                       |
                       +----JSci.maths.ComplexSquareMatrix

public class ComplexSquareMatrix
extends ComplexMatrix

The ComplexSquareMatrix class provides an object for encapsulating square matrices containing complex numbers.

##

ComplexSquareMatrix()
  Constructs a matrix.
ComplexSquareMatrix(Complex[][])
  Constructs a matrix by wrapping an array.
ComplexSquareMatrix(ComplexVector[])
  Constructs a matrix from an array of vectors (columns).
ComplexSquareMatrix(int)
  Constructs an empty matrix.

##

add(ComplexMatrix)
  Returns the addition of this matrix and another.
add(ComplexSquareMatrix)
  Returns the addition of this matrix and another.
conjugate()
  Returns the complex conjugate of this matrix.
det()
  Returns the determinant.
hermitianAdjoint()
  Returns the hermitian adjoint of this matrix.
inverse()
  Returns the inverse of this matrix.
isHermitian()
  Returns true if this matrix is hermitian.
isUnitary()
  Returns true if this matrix is unitary.
luDecompose()
  Returns the LU decomposition of this matrix.
mapElements(Mapping)
  Applies a function on all the matrix elements.
multiply(ComplexMatrix)
  Returns the multiplication of this matrix and another.
multiply(ComplexSquareMatrix)
  Returns the multiplication of this matrix and another.
multiply(ComplexVector)
  Returns the multiplication of a vector by this matrix.
scalarMultiply(Complex)
  Returns the multiplication of this matrix by a scalar.
scalarMultiply(double)
  Returns the multiplication of this matrix by a scalar.
subtract(ComplexMatrix)
  Returns the subtraction of this matrix by another.
subtract(ComplexSquareMatrix)
  Returns the subtraction of this matrix by another.
trace()
  Returns the trace.
transpose()
  Returns the transpose of this matrix.

##

ComplexSquareMatrix

     protected ComplexSquareMatrix()

  Constructs a matrix.

ComplexSquareMatrix

     public ComplexSquareMatrix(int size)

  Constructs an empty matrix.

  Parameters:
    size - the number of rows/columns

ComplexSquareMatrix

     public ComplexSquareMatrix(Complex array[][])

  Constructs a matrix by wrapping an array.

  Parameters:
    array - an assigned value
  Throws: MatrixDimensionException
    If the array is not square.

ComplexSquareMatrix

     public ComplexSquareMatrix(ComplexVector array[])

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

  Parameters:
    array - an assigned value

##

isHermitian

     public boolean isHermitian()

  Returns true if this matrix is hermitian.

isUnitary

     public boolean isUnitary()

  Returns true if this matrix is unitary.

det

     public Complex det()

  Returns the determinant.

trace

     public Complex trace()

  Returns the trace.

add

     public ComplexMatrix add(ComplexMatrix m)

  Returns the addition of this matrix and another.

  Parameters:
    m - a complex matrix
  Throws: MatrixDimensionException
    If the matrices are different sizes.
  Overrides:
    add in class ComplexMatrix

add

     public ComplexSquareMatrix add(ComplexSquareMatrix m)

  Returns the addition of this matrix and another.

  Parameters:
    m - a complex square matrix
  Throws: MatrixDimensionException
    If the matrices are different sizes.

subtract

     public ComplexMatrix subtract(ComplexMatrix m)

  Returns the subtraction of this matrix by another.

  Parameters:
    m - a complex matrix
  Throws: MatrixDimensionException
    If the matrices are different sizes.
  Overrides:
    subtract in class ComplexMatrix

subtract

     public ComplexSquareMatrix subtract(ComplexSquareMatrix m)

  Returns the subtraction of this matrix by another.

  Parameters:
    m - a complex square matrix
  Throws: MatrixDimensionException
    If the matrices are different sizes.

scalarMultiply

     public ComplexMatrix scalarMultiply(Complex z)

  Returns the multiplication of this matrix by a scalar.

  Parameters:
    z - a complex number
  Returns:
    a complex square matrix
  Overrides:
    scalarMultiply in class ComplexMatrix

scalarMultiply

     public ComplexMatrix scalarMultiply(double x)

  Returns the multiplication of this matrix by a scalar.

  Parameters:
    x - a double
  Returns:
    a complex square matrix
  Overrides:
    scalarMultiply in class ComplexMatrix

multiply

     public ComplexVector multiply(ComplexVector v)

  Returns the multiplication of a vector by this matrix.

  Parameters:
    v - a complex vector
  Throws: DimensionException
    If the matrix and vector are incompatible.
  Overrides:
    multiply in class ComplexMatrix

multiply

     public ComplexMatrix multiply(ComplexMatrix m)

  Returns the multiplication of this matrix and another.

  Parameters:
    m - a complex matrix
  Throws: MatrixDimensionException
    If the matrices are incompatible.
  Overrides:
    multiply in class ComplexMatrix

multiply

     public ComplexSquareMatrix multiply(ComplexSquareMatrix m)

  Returns the multiplication of this matrix and another.

  Parameters:
    m - a complex square matrix
  Throws: MatrixDimensionException
    If the matrices are incompatible.

hermitianAdjoint

     public ComplexMatrix hermitianAdjoint()

  Returns the hermitian adjoint of this matrix.

  Returns:
    a complex square matrix
  Overrides:
    hermitianAdjoint in class ComplexMatrix

conjugate

     public ComplexMatrix conjugate()

  Returns the complex conjugate of this matrix.

  Returns:
    a complex square matrix
  Overrides:
    conjugate in class ComplexMatrix

transpose

     public Matrix transpose()

  Returns the transpose of this matrix.

  Returns:
    a complex square matrix
  Overrides:
    transpose in class ComplexMatrix

inverse

     public ComplexSquareMatrix inverse()

  Returns the inverse of this matrix.

  Returns:
    a complex square matrix

luDecompose

     public ComplexSquareMatrix[] luDecompose()

  Returns the LU decomposition of this matrix.

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

mapElements

     public ComplexMatrix mapElements(Mapping f)

  Applies a function on all the matrix elements.

  Parameters:
    f - a user-defined function
  Returns:
    a complex square matrix
  Overrides:
    mapElements in class ComplexMatrix

    All Packages  Class Hierarchy  This Package  Previous  Next  Index