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.
Uses compressed diagonal storage.
-
DIAGONAL
- Storage format identifier.
-
storageFormat
-
-
ComplexDiagonalMatrix()
- Constructs a matrix.
-
ComplexDiagonalMatrix(Complex[])
- Constructs a matrix by wrapping an array containing the diagonal elements.
-
ComplexDiagonalMatrix(Complex[][])
- Constructs a matrix from an array.
-
ComplexDiagonalMatrix(int)
- Constructs an empty matrix.
-
add(ComplexDiagonalMatrix)
- Returns the addition of this matrix and another.
-
add(ComplexMatrix)
- Returns the addition of this matrix and another.
-
add(ComplexSquareMatrix)
- Returns the addition of this matrix and another.
-
add(ComplexTridiagonalMatrix)
- Returns the addition of this matrix and another.
-
columns()
- Returns the number of columns.
-
conjugate()
- Returns the complex conjugate of this matrix.
-
det()
- Returns the determinant.
-
equals(Object)
- Compares two complex diagonal matrices for equality.
-
frobeniusNorm()
- Returns the Frobenius norm.
-
getElement(int, int)
- Returns an element of the matrix.
-
identity(int)
- Creates an identity matrix.
-
imag()
- Returns the imaginary part of this complex matrix.
-
infNorm()
- Returns the l(infinity)-norm.
-
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(ComplexDiagonalMatrix)
- Returns the multiplication of this matrix and another.
-
multiply(ComplexMatrix)
- Returns the multiplication of this matrix and another.
-
multiply(ComplexSquareMatrix)
- Returns the multiplication of this matrix and another.
-
multiply(ComplexTridiagonalMatrix)
- Returns the multiplication of this matrix and another.
-
multiply(ComplexVector)
- Returns the multiplication of a vector by this matrix.
-
multiply(Matrix)
- Returns the multiplication of this matrix and another.
-
real()
- Returns the real part of this complex matrix.
-
rows()
- Returns the number of rows.
-
scalarMultiply(Complex)
- Returns the multiplication of this matrix by a scalar.
-
scalarMultiply(double)
- Returns the multiplication of this matrix by a scalar.
-
setElement(int, int, Complex)
- Sets the value of an element of the matrix.
-
subtract(ComplexDiagonalMatrix)
- Returns the subtraction of this matrix by another.
-
subtract(ComplexMatrix)
- Returns the subtraction of this matrix by another.
-
subtract(ComplexSquareMatrix)
- Returns the subtraction of this matrix by another.
-
subtract(ComplexTridiagonalMatrix)
- Returns the subtraction of this matrix by another.
-
subtract(Matrix)
- Returns the subtraction of this matrix by another.
-
trace()
- Returns the trace.
-
transpose()
- Returns the transpose of this matrix.
DIAGONAL
protected static final int DIAGONAL
- Storage format identifier.
storageFormat
protected static final int storageFormat
ComplexDiagonalMatrix
protected ComplexDiagonalMatrix()
- Constructs a matrix.
ComplexDiagonalMatrix
public ComplexDiagonalMatrix(int size)
- Constructs an empty matrix.
- Parameters:
- size - the number of rows/columns
ComplexDiagonalMatrix
public ComplexDiagonalMatrix(Complex array[][])
- Constructs a matrix from an array.
- Parameters:
- array - an assigned value
- Throws: MatrixDimensionException
- If the array is not square.
ComplexDiagonalMatrix
public ComplexDiagonalMatrix(Complex array[])
- Constructs a matrix by wrapping an array containing the diagonal elements.
- Parameters:
- array - an assigned value
identity
public static ComplexDiagonalMatrix identity(int size)
- Creates an identity matrix.
- Parameters:
- size - the number of rows/columns
equals
public boolean equals(Object m)
- Compares two complex diagonal matrices for equality.
- Parameters:
- m - a complex diagonal matrix
- Overrides:
- equals in class ComplexTridiagonalMatrix
real
public DoubleMatrix real()
- Returns the real part of this complex matrix.
- Returns:
- a double diagonal matrix
- Overrides:
- real in class ComplexTridiagonalMatrix
imag
public DoubleMatrix imag()
- Returns the imaginary part of this complex matrix.
- Returns:
- a double diagonal matrix
- Overrides:
- imag in class ComplexTridiagonalMatrix
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
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
isHermitian
public boolean isHermitian()
- Returns true if this matrix is hermitian.
- Overrides:
- isHermitian in class ComplexSquareMatrix
isUnitary
public boolean isUnitary()
- Returns true if this matrix is unitary.
- Overrides:
- isUnitary in class ComplexSquareMatrix
det
public Complex det()
- Returns the determinant.
- Overrides:
- det in class ComplexSquareMatrix
trace
public Complex trace()
- Returns the trace.
- Overrides:
- trace in class ComplexTridiagonalMatrix
infNorm
public double infNorm()
- Returns the l(infinity)-norm.
- Overrides:
- infNorm in class ComplexTridiagonalMatrix
frobeniusNorm
public double frobeniusNorm()
- Returns the Frobenius norm.
- Overrides:
- frobeniusNorm in class ComplexTridiagonalMatrix
rows
public int rows()
- Returns the number of rows.
- Overrides:
- rows in class ComplexTridiagonalMatrix
columns
public int columns()
- Returns the number of columns.
- Overrides:
- columns in class ComplexTridiagonalMatrix
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 ComplexTridiagonalMatrix
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.
- Overrides:
- add in class ComplexTridiagonalMatrix
add
public ComplexTridiagonalMatrix add(ComplexTridiagonalMatrix m)
- Returns the addition of this matrix and another.
- Parameters:
- m - a complex tridiagonal matrix
- Throws: MatrixDimensionException
- If the matrices are different sizes.
- Overrides:
- add in class ComplexTridiagonalMatrix
add
public ComplexDiagonalMatrix add(ComplexDiagonalMatrix m)
- Returns the addition of this matrix and another.
- Parameters:
- m - a complex diagonal matrix
- Throws: MatrixDimensionException
- If the matrices are different sizes.
subtract
public Matrix subtract(Matrix m)
- Returns the subtraction of this matrix by another.
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 ComplexTridiagonalMatrix
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.
- Overrides:
- subtract in class ComplexTridiagonalMatrix
subtract
public ComplexTridiagonalMatrix subtract(ComplexTridiagonalMatrix m)
- Returns the subtraction of this matrix by another.
- Parameters:
- m - a complex tridiagonal matrix
- Throws: MatrixDimensionException
- If the matrices are different sizes.
- Overrides:
- subtract in class ComplexTridiagonalMatrix
subtract
public ComplexDiagonalMatrix subtract(ComplexDiagonalMatrix m)
- Returns the subtraction of this matrix by another.
- Parameters:
- m - a complex diagonal 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 diagonal matrix
- Overrides:
- scalarMultiply in class ComplexTridiagonalMatrix
scalarMultiply
public ComplexMatrix scalarMultiply(double x)
- Returns the multiplication of this matrix by a scalar.
- Parameters:
- x - a double
- Returns:
- a complex diagonal matrix
- Overrides:
- scalarMultiply in class ComplexTridiagonalMatrix
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 ComplexTridiagonalMatrix
multiply
public Matrix multiply(Matrix m)
- Returns the multiplication of this matrix and another.
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 different sizes.
- Overrides:
- multiply in class ComplexTridiagonalMatrix
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 different sizes.
- Overrides:
- multiply in class ComplexTridiagonalMatrix
multiply
public ComplexSquareMatrix multiply(ComplexTridiagonalMatrix m)
- Returns the multiplication of this matrix and another.
- Parameters:
- m - a complex tridiagonal matrix
- Throws: MatrixDimensionException
- If the matrices are different sizes.
- Overrides:
- multiply in class ComplexTridiagonalMatrix
multiply
public ComplexDiagonalMatrix multiply(ComplexDiagonalMatrix m)
- Returns the multiplication of this matrix and another.
- Parameters:
- m - a complex diagonal matrix
- Throws: MatrixDimensionException
- If the matrices are different sizes.
inverse
public ComplexSquareMatrix inverse()
- Returns the inverse of this matrix.
- Returns:
- a complex diagonal matrix
- Overrides:
- inverse in class ComplexSquareMatrix
conjugate
public ComplexMatrix conjugate()
- Returns the complex conjugate of this matrix.
- Returns:
- a complex diagonal matrix
- Overrides:
- conjugate in class ComplexTridiagonalMatrix
transpose
public Matrix transpose()
- Returns the transpose of this matrix.
- Returns:
- a complex diagonal matrix
- Overrides:
- transpose in class ComplexTridiagonalMatrix
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.
- Overrides:
- luDecompose in class ComplexTridiagonalMatrix
mapElements
public ComplexMatrix mapElements(Mapping f)
- Applies a function on all the matrix elements.
- Parameters:
- f - a user-defined function
- Returns:
- a complex diagonal matrix
- Overrides:
- mapElements in class ComplexTridiagonalMatrix
All Packages Class Hierarchy This Package Previous Next Index