Class JSci.maths.ComplexDiagonalMatrix
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JSci.maths.ComplexDiagonalMatrix

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

public final class ComplexDiagonalMatrix
extends ComplexTridiagonalMatrix
The ComplexDiagonalMatrix class provides an object for encapsulating diagonal matrices containing complex numbers.

Constructor Index

 o ComplexDiagonalMatrix(Complex[])
Constructs a matrix by wrapping an array containing the diagonal elements.
 o ComplexDiagonalMatrix(Complex[][])
Constructs a matrix from an array.
 o ComplexDiagonalMatrix(int)
Constructs an empty matrix.

Method Index

 o clone()
Creates a clone of this matrix.
 o columns()
Returns the number of columns.
 o determinant()
Returns the determinant.
 o equals(Object)
Compares two complex diagonal matrices for equality.
 o frobeniusNorm()
Returns the Frobenius norm.
 o getElement(int, int)
Returns an element of the matrix.
 o identity(int)
Creates an identity matrix.
 o imag()
Returns the imaginary part of this complex matrix.
 o infNorm()
Returns the l(infinity)-norm.
 o isHermitian()
Returns true if this matrix is hermitian.
 o isUnitary()
Returns true if this matrix is unitary.
 o real()
Returns the real part of this complex matrix.
 o rows()
Returns the number of rows.
 o setElement(int, int, Complex)
Sets the value of an element of the matrix.
 o trace()
Returns the trace.

Constructors

 o ComplexDiagonalMatrix
  public ComplexDiagonalMatrix(int size)
Constructs an empty matrix.
Parameters:
size - the number of rows/columns
 o ComplexDiagonalMatrix
  public ComplexDiagonalMatrix(Complex array[][])
Constructs a matrix from an array.
Parameters:
array - an assigned value
Throws: MatrixDimensionException
If the array is not square.
 o ComplexDiagonalMatrix
  public ComplexDiagonalMatrix(Complex array[])
Constructs a matrix by wrapping an array containing the diagonal elements.
Parameters:
array - an assigned value

Methods

 o identity
  public static ComplexDiagonalMatrix identity(int size)
Creates an identity matrix.
Parameters:
size - the number of rows/columns
 o equals
  public boolean equals(Object m)
Compares two complex diagonal matrices for equality.
Parameters:
m - a complex diagonal matrix
Overrides:
equals in class ComplexTridiagonalMatrix
 o clone
  public Object clone()
Creates a clone of this matrix.
Returns:
a copy of this matrix.
Overrides:
clone in class ComplexTridiagonalMatrix
 o real
  public DoubleMatrix real()
Returns the real part of this complex matrix.
Returns:
a double diagonal matrix
Overrides:
real in class ComplexTridiagonalMatrix
 o imag
  public DoubleMatrix imag()
Returns the imaginary part of this complex matrix.
Returns:
a double diagonal matrix
Overrides:
imag in class ComplexTridiagonalMatrix
 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.
Overrides:
getElement in class ComplexTridiagonalMatrix
 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.
Overrides:
setElement in class ComplexTridiagonalMatrix
 o isHermitian
  public boolean isHermitian()
Returns true if this matrix is hermitian.
Overrides:
isHermitian in class ComplexMatrix
 o isUnitary
  public boolean isUnitary()
Returns true if this matrix is unitary.
Overrides:
isUnitary in class ComplexSquareMatrix
 o determinant
  public Complex determinant()
Returns the determinant.
Overrides:
determinant in class ComplexSquareMatrix
 o trace
  public Complex trace()
Returns the trace.
Overrides:
trace in class ComplexTridiagonalMatrix
 o infNorm
  public double infNorm()
Returns the l(infinity)-norm.
Overrides:
infNorm in class ComplexTridiagonalMatrix
 o frobeniusNorm
  public double frobeniusNorm()
Returns the Frobenius norm.
Overrides:
frobeniusNorm in class ComplexTridiagonalMatrix
 o rows
  public int rows()
Returns the number of rows.
Overrides:
rows in class ComplexTridiagonalMatrix
 o columns
  public int columns()
Returns the number of columns.
Overrides:
columns in class ComplexTridiagonalMatrix

All Packages  Class Hierarchy  This Package  Previous  Next  Index