All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.ComplexMatrix

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

public class ComplexMatrix
extends Matrix
The ComplexMatrix class provides an object for encapsulating matrices containing complex numbers.


Variable Index

 o ARRAY_2D
Storage format identifier.
 o matrix
Array containing the elements of the matrix.
 o storageFormat

Constructor Index

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

Method Index

 o add(AbelianGroupMember)
Returns the addition of this matrix and another.
 o add(ComplexMatrix)
Returns the addition of this matrix and another.
 o columns()
Returns the number of columns.
 o conjugate()
Returns the complex conjugate of this matrix.
 o equals(Object)
Compares two complex matrices for equality.
 o finalize()
Finalize.
 o frobeniusNorm()
Returns the Frobenius norm.
 o getElement(int, int)
Returns an element of the matrix.
 o hashCode()
Returns a hashcode for this matrix.
 o hermitianAdjoint()
Returns the hermitian adjoint of this matrix.
 o imag()
Returns the imaginary part of this complex matrix.
 o infNorm()
Returns the l(infinity)-norm.
 o mapElements(Mapping)
Applies a function on all the matrix elements.
 o multiply(ComplexMatrix)
Returns the multiplication of this matrix and another.
 o multiply(ComplexVector)
Returns the multiplication of a vector by this matrix.
 o multiply(RingMember)
Returns the multiplication of this matrix and another.
 o negate()
Returns the negative of this matrix.
 o real()
Returns the real part of this complex matrix.
 o rows()
Returns the number of rows.
 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 scalarMultiply(RingMember)
Returns the multiplication of this matrix by a scalar.
 o setElement(int, int, Complex)
Sets the value of an element of the matrix.
 o subtract(AbelianGroupMember)
Returns the subtraction of this matrix by another.
 o subtract(ComplexMatrix)
Returns the subtraction of this matrix by another.
 o toString()
Returns a string representing this matrix.
 o transpose()
Returns the transpose of this matrix.

Variables

 o ARRAY_2D
 protected static final int ARRAY_2D
Storage format identifier.

 o storageFormat
 protected static final int storageFormat
 o matrix
 protected Complex matrix[][]
Array containing the elements of the matrix.

Constructors

 o ComplexMatrix
 protected ComplexMatrix()
Constructs a matrix.

 o ComplexMatrix
 public ComplexMatrix(int row,
                      int col)
Constructs an empty matrix.

Parameters:
row - the number of rows
col - the number of columns
 o ComplexMatrix
 public ComplexMatrix(Complex array[][])
Constructs a matrix by wrapping an array.

Parameters:
array - an assigned value
 o ComplexMatrix
 public ComplexMatrix(ComplexVector array[])
Constructs a matrix from an array of vectors (columns).

Parameters:
array - an assigned value

Methods

 o finalize
 protected void finalize() throws Throwable
Finalize.

Throws: Throwable
Any that occur.
Overrides:
finalize in class Object
 o equals
 public boolean equals(Object m)
Compares two complex matrices for equality.

Parameters:
m - a complex matrix
Overrides:
equals in class Object
 o toString
 public String toString()
Returns a string representing this matrix.

Overrides:
toString in class Object
 o hashCode
 public int hashCode()
Returns a hashcode for this matrix.

Overrides:
hashCode in class Object
 o real
 public DoubleMatrix real()
Returns the real part of this complex matrix.

Returns:
a double matrix
 o imag
 public DoubleMatrix imag()
Returns the imaginary part of this complex matrix.

Returns:
a double matrix
 o getElement
 public Complex getElement(int i,
                           int j)
Returns an element of the matrix.

Parameters:
i - row index of the element
j - column index of the element
Throws: MatrixDimensionException
If attempting to access an invalid element.
 o setElement
 public void setElement(int i,
                        int j,
                        Complex z)
Sets the value of an element of the matrix.

Parameters:
i - row index of the element
j - column index of the element
z - a complex number
Throws: MatrixDimensionException
If attempting to access an invalid element.
 o infNorm
 public double infNorm()
Returns the l(infinity)-norm.

 o frobeniusNorm
 public double frobeniusNorm()
Returns the Frobenius norm.

 o rows
 public int rows()
Returns the number of rows.

Overrides:
rows in class Matrix
 o columns
 public int columns()
Returns the number of columns.

Overrides:
columns in class Matrix
 o negate
 public AbelianGroupMember negate()
Returns the negative of this matrix.

Overrides:
negate in class Matrix
 o add
 public AbelianGroupMember add(AbelianGroupMember m)
Returns the addition of this matrix and another.

Overrides:
add in class Matrix
 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.
 o subtract
 public AbelianGroupMember subtract(AbelianGroupMember m)
Returns the subtraction of this matrix by another.

Overrides:
subtract in class Matrix
 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.
 o scalarMultiply
 public AlgebraMember scalarMultiply(RingMember x)
Returns the multiplication of this matrix by a scalar.

Overrides:
scalarMultiply in class Matrix
 o scalarMultiply
 public ComplexMatrix scalarMultiply(Complex z)
Returns the multiplication of this matrix by a scalar.

Parameters:
z - a complex number
Returns:
a complex matrix
 o scalarMultiply
 public ComplexMatrix scalarMultiply(double x)
Returns the multiplication of this matrix by a scalar.

Parameters:
x - a double
Returns:
a complex matrix
 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.
 o multiply
 public RingMember multiply(RingMember m)
Returns the multiplication of this matrix and another.

Overrides:
multiply in class Matrix
 o multiply
 public ComplexMatrix multiply(ComplexMatrix m)
Returns the multiplication of this matrix and another.

Parameters:
m - a complex matrix
Returns:
a ComplexMatrix or a ComplexSquareMatrix as appropriate
Throws: MatrixDimensionException
If the matrices are incompatible.
 o hermitianAdjoint
 public ComplexMatrix hermitianAdjoint()
Returns the hermitian adjoint of this matrix.

Returns:
a complex matrix
 o conjugate
 public ComplexMatrix conjugate()
Returns the complex conjugate of this matrix.

Returns:
a complex matrix
 o transpose
 public Matrix transpose()
Returns the transpose of this matrix.

Returns:
a complex matrix
Overrides:
transpose in class 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 matrix

All Packages  Class Hierarchy  This Package  Previous  Next  Index