Class JSci.maths.ComplexMatrix
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.
-
matrix
- Array containing the elements of the matrix.
-
ComplexMatrix()
- Constructs a matrix.
-
ComplexMatrix(Complex[][])
- Constructs a matrix by wrapping an array.
-
ComplexMatrix(ComplexVector[])
- Constructs a matrix from an array of vectors.
-
ComplexMatrix(int, int)
- Constructs an empty matrix.
-
clone()
- Creates a clone of this matrix.
-
columns()
- Returns the number of columns.
-
equals(Object)
- Compares two complex matrices for equality.
-
frobeniusNorm()
- Returns the Frobenius norm.
-
getElement(int, int)
- Returns an element of the matrix.
-
hashCode()
- Returns a hashcode for this matrix.
-
imag()
- Returns the imaginary part of this complex matrix.
-
infNorm()
- Returns the l(infinity)-norm.
-
isHermitian()
- Returns true if this matrix is hermitian.
-
real()
- Returns the real part of this complex matrix.
-
rows()
- Returns the number of rows.
-
setElement(int, int, Complex)
- Sets the value of an element of the matrix.
-
toString()
- Returns a string representing this matrix.
matrix
protected Complex matrix[][]
- Array containing the elements of the matrix.
ComplexMatrix
protected ComplexMatrix()
- Constructs a matrix.
ComplexMatrix
public ComplexMatrix(int row,
int col)
- Constructs an empty matrix.
- Parameters:
- row - the number of rows
- col - the number of columns
ComplexMatrix
public ComplexMatrix(Complex array[][])
- Constructs a matrix by wrapping an array.
- Parameters:
- array - an assigned value
ComplexMatrix
public ComplexMatrix(ComplexVector array[])
- Constructs a matrix from an array of vectors.
- Parameters:
- array - an assigned value
equals
public boolean equals(Object m)
- Compares two complex matrices for equality.
- Parameters:
- m - a complex matrix
- Overrides:
- equals in class Object
clone
public Object clone()
- Creates a clone of this matrix.
- Returns:
- a copy of this matrix.
- Overrides:
- clone in class Object
toString
public String toString()
- Returns a string representing this matrix.
- Overrides:
- toString in class Object
hashCode
public int hashCode()
- Returns a hashcode for this matrix.
- Overrides:
- hashCode in class Object
isHermitian
public boolean isHermitian()
- Returns true if this matrix is hermitian.
real
public DoubleMatrix real()
- Returns the real part of this complex matrix.
- Returns:
- a double matrix
imag
public DoubleMatrix imag()
- Returns the imaginary part of this complex matrix.
- Returns:
- a double matrix
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.
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.
infNorm
public double infNorm()
- Returns the l(infinity)-norm.
frobeniusNorm
public double frobeniusNorm()
- Returns the Frobenius norm.
rows
public int rows()
- Returns the number of rows.
- Overrides:
- rows in class Matrix
columns
public int columns()
- Returns the number of columns.
- Overrides:
- columns in class Matrix
All Packages Class Hierarchy This Package Previous Next Index