|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJSci.maths.Matrix
JSci.maths.ComplexMatrix
JSci.maths.ComplexSquareMatrix
JSci.maths.ComplexTridiagonalMatrix
JSci.maths.ComplexDiagonalMatrix
public final class ComplexDiagonalMatrix
The ComplexDiagonalMatrix class provides an object for encapsulating diagonal matrices containing complex numbers. Uses compressed diagonal storage.
Field Summary | |
---|---|
protected static int |
DIAGONAL
Storage format identifier. |
Fields inherited from class JSci.maths.ComplexTridiagonalMatrix |
---|
diagIm, diagRe, ldiagIm, ldiagRe, TRIDIAGONAL, udiagIm, udiagRe |
Fields inherited from class JSci.maths.ComplexSquareMatrix |
---|
LU, LUpivot |
Fields inherited from class JSci.maths.ComplexMatrix |
---|
ARRAY_2D, matrixIm, matrixRe |
Fields inherited from class JSci.maths.Matrix |
---|
CLASS_SPECIFIC, numCols, numRows, storageFormat |
Constructor Summary | |
---|---|
|
ComplexDiagonalMatrix(Complex[] array)
Constructs a matrix from an array containing the diagonal elements. |
|
ComplexDiagonalMatrix(Complex[][] array)
Constructs a matrix from an array. |
|
ComplexDiagonalMatrix(double[] arrayRe,
double[] arrayIm)
Constructs a matrix by wrapping two arrays containing the diagonal elements. |
|
ComplexDiagonalMatrix(int size)
Constructs an empty matrix. |
protected |
ComplexDiagonalMatrix(int size,
int storeID)
Constructs a matrix. |
Method Summary | |
---|---|
ComplexDiagonalMatrix |
add(ComplexDiagonalMatrix m)
Returns the addition of this matrix and another. |
ComplexMatrix |
add(ComplexMatrix m)
Returns the addition of this matrix and another. |
ComplexSquareMatrix |
add(ComplexSquareMatrix m)
Returns the addition of this matrix and another. |
ComplexTridiagonalMatrix |
add(ComplexTridiagonalMatrix m)
Returns the addition of this matrix and another. |
ComplexMatrix |
conjugate()
Returns the complex conjugate of this matrix. |
Complex |
det()
Returns the determinant. |
boolean |
equals(java.lang.Object m)
Compares two complex diagonal matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius (l2) norm. |
Complex |
getElement(int i,
int j)
Returns an element of the matrix. |
ComplexMatrix |
hermitianAdjoint()
Returns the hermitian adjoint of this matrix. |
static ComplexDiagonalMatrix |
identity(int size)
Creates an identity matrix. |
DoubleMatrix |
imag()
Returns the imaginary part of this complex matrix. |
double |
infNorm()
Returns the l ![]() |
ComplexSquareMatrix |
inverse()
Returns the inverse of this matrix. |
boolean |
isHermitian()
Returns true if this matrix is hermitian. |
boolean |
isUnitary()
Returns true if this matrix is unitary. |
ComplexSquareMatrix[] |
luDecompose(int[] pivot)
Returns the LU decomposition of this matrix. |
ComplexMatrix |
mapElements(ComplexMapping f)
Applies a function on all the matrix elements. |
ComplexDiagonalMatrix |
multiply(ComplexDiagonalMatrix m)
Returns the multiplication of this matrix and another. |
ComplexMatrix |
multiply(ComplexMatrix m)
Returns the multiplication of this matrix and another. |
ComplexSquareMatrix |
multiply(ComplexSquareMatrix m)
Returns the multiplication of this matrix and another. |
ComplexSquareMatrix |
multiply(ComplexTridiagonalMatrix m)
Returns the multiplication of this matrix and another. |
ComplexVector |
multiply(ComplexVector v)
Returns the multiplication of a vector by this matrix. |
double |
operatorNorm()
Returns the operator norm. |
DoubleMatrix |
real()
Returns the real part of this complex matrix. |
ComplexMatrix |
scalarMultiply(Complex z)
Returns the multiplication of this matrix by a scalar. |
ComplexMatrix |
scalarMultiply(double x)
Returns the multiplication of this matrix by a scalar. |
void |
setElement(int i,
int j,
Complex z)
Sets the value of an element of the matrix. |
void |
setElement(int i,
int j,
double x,
double y)
Sets the value of an element of the matrix. |
ComplexDiagonalMatrix |
subtract(ComplexDiagonalMatrix m)
Returns the subtraction of this matrix by another. |
ComplexMatrix |
subtract(ComplexMatrix m)
Returns the subtraction of this matrix by another. |
ComplexSquareMatrix |
subtract(ComplexSquareMatrix m)
Returns the subtraction of this matrix by another. |
ComplexTridiagonalMatrix |
subtract(ComplexTridiagonalMatrix m)
Returns the subtraction of this matrix by another. |
Complex |
trace()
Returns the trace. |
Matrix |
transpose()
Returns the transpose of this matrix. |
Methods inherited from class JSci.maths.ComplexTridiagonalMatrix |
---|
toString |
Methods inherited from class JSci.maths.ComplexSquareMatrix |
---|
involution, norm, polarDecompose |
Methods inherited from class JSci.maths.ComplexMatrix |
---|
add, directSum, finalize, hashCode, multiply, negate, scalarDivide, scalarDivide, scalarDivide, scalarMultiply, subtract, tensorProduct |
Methods inherited from class JSci.maths.Matrix |
---|
columns, getInvalidElementMsg, rows |
Methods inherited from class java.lang.Object |
---|
clone, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface JSci.maths.fields.Ring.Member |
---|
multiply |
Methods inherited from interface JSci.maths.algebras.VectorSpace.Member |
---|
scalarDivide |
Methods inherited from interface JSci.maths.algebras.Module.Member |
---|
scalarMultiply |
Field Detail |
---|
protected static final int DIAGONAL
Constructor Detail |
---|
protected ComplexDiagonalMatrix(int size, int storeID)
public ComplexDiagonalMatrix(int size)
size
- the number of rows/columnspublic ComplexDiagonalMatrix(Complex[][] array)
array
- an assigned value
MatrixDimensionException
- If the array is not square.public ComplexDiagonalMatrix(double[] arrayRe, double[] arrayIm)
arrayRe
- an array of real valuesarrayIm
- an array of imaginary valuespublic ComplexDiagonalMatrix(Complex[] array)
array
- an assigned valueMethod Detail |
---|
public static ComplexDiagonalMatrix identity(int size)
size
- the number of rows/columnspublic boolean equals(java.lang.Object m)
equals
in class ComplexTridiagonalMatrix
m
- a complex diagonal matrixpublic DoubleMatrix real()
real
in class ComplexTridiagonalMatrix
public DoubleMatrix imag()
imag
in class ComplexTridiagonalMatrix
public Complex getElement(int i, int j)
getElement
in class ComplexTridiagonalMatrix
i
- row index of the elementj
- column index of the element
MatrixDimensionException
- If attempting to access an invalid element.public void setElement(int i, int j, Complex z)
setElement
in class ComplexTridiagonalMatrix
i
- row index of the elementj
- column index of the elementz
- a complex number
MatrixDimensionException
- If attempting to access an invalid element.public void setElement(int i, int j, double x, double y)
setElement
in class ComplexTridiagonalMatrix
i
- row index of the elementj
- column index of the elementx
- the real part of a complex numbery
- the imaginary part of a complex number
MatrixDimensionException
- If attempting to access an invalid element.public boolean isHermitian()
isHermitian
in class ComplexSquareMatrix
public boolean isUnitary()
isUnitary
in class ComplexSquareMatrix
public Complex det()
det
in class ComplexSquareMatrix
public Complex trace()
trace
in class ComplexTridiagonalMatrix
public double infNorm()
infNorm
in class ComplexTridiagonalMatrix
public double frobeniusNorm()
frobeniusNorm
in class ComplexTridiagonalMatrix
public double operatorNorm()
operatorNorm
in class ComplexTridiagonalMatrix
public ComplexMatrix add(ComplexMatrix m)
add
in class ComplexTridiagonalMatrix
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix add(ComplexSquareMatrix m)
add
in class ComplexTridiagonalMatrix
m
- a complex square matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexTridiagonalMatrix add(ComplexTridiagonalMatrix m)
add
in class ComplexTridiagonalMatrix
m
- a complex tridiagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexDiagonalMatrix add(ComplexDiagonalMatrix m)
m
- a complex diagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexMatrix subtract(ComplexMatrix m)
subtract
in class ComplexTridiagonalMatrix
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix subtract(ComplexSquareMatrix m)
subtract
in class ComplexTridiagonalMatrix
m
- a complex square matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexTridiagonalMatrix subtract(ComplexTridiagonalMatrix m)
subtract
in class ComplexTridiagonalMatrix
m
- a complex tridiagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexDiagonalMatrix subtract(ComplexDiagonalMatrix m)
m
- a complex diagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexMatrix scalarMultiply(Complex z)
scalarMultiply
in class ComplexTridiagonalMatrix
z
- a complex number
public ComplexMatrix scalarMultiply(double x)
scalarMultiply
in class ComplexTridiagonalMatrix
x
- a double
public ComplexVector multiply(ComplexVector v)
multiply
in class ComplexTridiagonalMatrix
v
- a complex vector
DimensionException
- If the matrix and vector are incompatible.public ComplexMatrix multiply(ComplexMatrix m)
multiply
in class ComplexTridiagonalMatrix
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix multiply(ComplexSquareMatrix m)
multiply
in class ComplexTridiagonalMatrix
m
- a complex square matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix multiply(ComplexTridiagonalMatrix m)
multiply
in class ComplexTridiagonalMatrix
m
- a complex tridiagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexDiagonalMatrix multiply(ComplexDiagonalMatrix m)
m
- a complex diagonal matrix
MatrixDimensionException
- If the matrices are different sizes.public ComplexSquareMatrix inverse()
inverse
in class ComplexSquareMatrix
public ComplexMatrix hermitianAdjoint()
hermitianAdjoint
in class ComplexTridiagonalMatrix
public ComplexMatrix conjugate()
conjugate
in class ComplexTridiagonalMatrix
public Matrix transpose()
transpose
in class ComplexTridiagonalMatrix
public ComplexSquareMatrix[] luDecompose(int[] pivot)
luDecompose
in class ComplexTridiagonalMatrix
public ComplexMatrix mapElements(ComplexMapping f)
mapElements
in class ComplexTridiagonalMatrix
f
- a user-defined function
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |