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.


Constructor Index

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

Method Index

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

Constructors

 o ComplexSquareMatrix
 protected ComplexSquareMatrix()
Constructs a matrix.

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

Parameters:
size - the number of rows/columns
 o 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.
 o ComplexSquareMatrix
 public ComplexSquareMatrix(ComplexVector array[])
Constructs a matrix from an array of vectors (columns).

Parameters:
array - an assigned value

Methods

 o isHermitian
 public boolean isHermitian()
Returns true if this matrix is hermitian.

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

 o det
 public Complex det()
Returns the determinant.

 o trace
 public Complex trace()
Returns the trace.

 o 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
 o 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.
 o 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
 o 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.
 o 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
 o 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
 o 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
 o 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
 o 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.
 o hermitianAdjoint
 public ComplexMatrix hermitianAdjoint()
Returns the hermitian adjoint of this matrix.

Returns:
a complex square matrix
Overrides:
hermitianAdjoint in class ComplexMatrix
 o conjugate
 public ComplexMatrix conjugate()
Returns the complex conjugate of this matrix.

Returns:
a complex square matrix
Overrides:
conjugate in class ComplexMatrix
 o transpose
 public Matrix transpose()
Returns the transpose of this matrix.

Returns:
a complex square matrix
Overrides:
transpose in class ComplexMatrix
 o inverse
 public ComplexSquareMatrix inverse()
Returns the inverse of this matrix.

Returns:
a complex square matrix
 o 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.
 o 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