|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectJSci.maths.matrices.Matrix
JSci.maths.matrices.AbstractComplexMatrix
JSci.maths.matrices.AbstractComplexSquareMatrix
JSci.maths.matrices.ComplexSquareMatrix
The ComplexSquareMatrix class provides an object for encapsulating square matrices containing complex numbers.
| Field Summary | |
protected double[][] |
matrixIm
Arrays containing the elements of the matrix. |
protected double[][] |
matrixRe
Arrays containing the elements of the matrix. |
| Fields inherited from class JSci.maths.matrices.AbstractComplexSquareMatrix |
LU, LUpivot |
| Fields inherited from class JSci.maths.matrices.Matrix |
numCols, numRows |
| Constructor Summary | |
ComplexSquareMatrix(AbstractComplexVector[] array)
Constructs a matrix from an array of vectors. |
|
ComplexSquareMatrix(Complex[][] array)
Constructs a matrix from an array. |
|
ComplexSquareMatrix(double[][] arrayRe,
double[][] arrayIm)
Constructs a matrix by wrapping two arrays. |
|
ComplexSquareMatrix(int size)
Constructs an empty matrix. |
|
| Method Summary | |
AbstractComplexSquareMatrix |
add(AbstractComplexSquareMatrix m)
Returns the addition of this matrix and another. |
ComplexSquareMatrix |
add(ComplexSquareMatrix m)
|
AbstractComplexMatrix |
conjugate()
Returns the complex conjugate of this matrix. |
Complex |
det()
Returns the determinant. |
AbstractComplexSquareMatrix |
directSum(AbstractComplexSquareMatrix m)
Returns the direct sum of this matrix and another. |
boolean |
equals(AbstractComplexMatrix m)
Compares two complex matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius or Hilbert-Schmidt (l2) norm. |
Complex |
getElement(int i,
int j)
Returns an element of the matrix. |
double |
getImagElement(int i,
int j)
Returns the imag part of an element of the matrix. |
double |
getRealElement(int i,
int j)
Returns the real part of an element of the matrix. |
AbstractComplexMatrix |
hermitianAdjoint()
Returns the hermitian adjoint of this matrix. |
AbstractDoubleMatrix |
imag()
Returns the imaginary part of this complex matrix. |
double |
infNorm()
Returns the l -norm. |
AbstractComplexSquareMatrix |
inverse()
Returns the inverse of this matrix. |
AbstractComplexSquareMatrix[] |
luDecompose(int[] pivot)
Returns the LU decomposition of this matrix. |
AbstractComplexMatrix |
mapElements(ComplexMapping f)
Applies a function on all the matrix elements. |
AbstractComplexSquareMatrix |
multiply(AbstractComplexSquareMatrix m)
Returns the multiplication of this matrix and another. |
AbstractComplexVector |
multiply(AbstractComplexVector v)
Returns the multiplication of a vector by this matrix. |
ComplexSquareMatrix |
multiply(ComplexSquareMatrix m)
|
AbelianGroup.Member |
negate()
Returns the negative of this matrix. |
AbstractComplexSquareMatrix[] |
polarDecompose()
Returns the polar decomposition of this matrix. |
AbstractDoubleMatrix |
real()
Returns the real part of this complex matrix. |
AbstractComplexMatrix |
scalarMultiply(Complex z)
Returns the multiplication of this matrix by a scalar. |
AbstractComplexMatrix |
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. |
AbstractComplexSquareMatrix |
subtract(AbstractComplexSquareMatrix m)
Returns the subtraction of this matrix by another. |
ComplexSquareMatrix |
subtract(ComplexSquareMatrix m)
|
AbstractComplexSquareMatrix |
tensor(AbstractComplexSquareMatrix m)
Returns the tensor product of this matrix and another. |
java.lang.String |
toString()
Returns a string representing this matrix. |
Complex |
trace()
Returns the trace. |
Matrix |
transpose()
Returns the transpose of this matrix. |
| Methods inherited from class JSci.maths.matrices.AbstractComplexSquareMatrix |
add, involution, isHermitian, isUnitary, norm, operatorNorm, scalarDivide, scalarDivide, scalarProduct, scalarProduct, subtract |
| Methods inherited from class JSci.maths.matrices.AbstractComplexMatrix |
add, directSum, equals, hashCode, multiply, multiply, scalarDivide, scalarMultiply, subtract, tensor |
| Methods inherited from class JSci.maths.matrices.Matrix |
columns, getInvalidElementMsg, rows |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface JSci.maths.algebras.VectorSpace.Member |
scalarDivide |
| Methods inherited from interface JSci.maths.algebras.Module.Member |
scalarMultiply |
| Methods inherited from interface JSci.maths.groups.AbelianGroup.Member |
add, subtract |
| Methods inherited from interface JSci.maths.fields.Ring.Member |
multiply |
| Field Detail |
protected final double[][] matrixRe
protected final double[][] matrixIm
| Constructor Detail |
public ComplexSquareMatrix(double[][] arrayRe,
double[][] arrayIm)
arrayRe - an array of real valuesarrayIm - an array of imaginary values
MatrixDimensionException - If the array is not square.public ComplexSquareMatrix(int size)
size - the number of rows/columnspublic ComplexSquareMatrix(Complex[][] array)
array - an assigned value
MatrixDimensionException - If the array is not square.public ComplexSquareMatrix(AbstractComplexVector[] array)
array - an assigned value.
MatrixDimensionException - If the array is not square.| Method Detail |
public boolean equals(AbstractComplexMatrix m)
equals in class AbstractComplexMatrixm - a complex matrixpublic java.lang.String toString()
toString in class AbstractComplexMatrixpublic AbstractDoubleMatrix real()
real in class AbstractComplexSquareMatrixpublic AbstractDoubleMatrix imag()
imag in class AbstractComplexSquareMatrix
public Complex getElement(int i,
int j)
getElement in class AbstractComplexMatrixi - row index of the elementj - column index of the element
MatrixDimensionException - If attempting to access an invalid element.
public double getRealElement(int i,
int j)
AbstractComplexMatrix
getRealElement in class AbstractComplexMatrixi - row index of the elementj - column index of the element
public double getImagElement(int i,
int j)
AbstractComplexMatrix
getImagElement in class AbstractComplexMatrixi - row index of the elementj - column index of the element
public void setElement(int i,
int j,
Complex z)
setElement in class AbstractComplexMatrixi - 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 AbstractComplexMatrixi - 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 double infNorm()
-norm.
infNorm in class AbstractComplexMatrixpublic double frobeniusNorm()
frobeniusNorm in class AbstractComplexMatrixpublic Complex det()
det in class AbstractComplexSquareMatrixpublic Complex trace()
trace in class AbstractComplexSquareMatrixpublic AbelianGroup.Member negate()
negate in interface AbelianGroup.Membernegate in class AbstractComplexSquareMatrixpublic AbstractComplexSquareMatrix add(AbstractComplexSquareMatrix m)
add in class AbstractComplexSquareMatrixm - a complex matrix
MatrixDimensionException - If the matrices are different sizes.public ComplexSquareMatrix add(ComplexSquareMatrix m)
public AbstractComplexSquareMatrix subtract(AbstractComplexSquareMatrix m)
subtract in class AbstractComplexSquareMatrixm - a complex matrix
MatrixDimensionException - If the matrices are different sizes.public ComplexSquareMatrix subtract(ComplexSquareMatrix m)
public AbstractComplexMatrix scalarMultiply(Complex z)
scalarMultiply in class AbstractComplexSquareMatrixz - a complex number
public AbstractComplexMatrix scalarMultiply(double x)
scalarMultiply in class AbstractComplexSquareMatrixx - a double
public AbstractComplexVector multiply(AbstractComplexVector v)
multiply in class AbstractComplexMatrixv - a complex vector
DimensionException - If the matrix and vector are incompatible.public AbstractComplexSquareMatrix multiply(AbstractComplexSquareMatrix m)
multiply in class AbstractComplexSquareMatrixm - a complex square matrix
MatrixDimensionException - If the matrices are incompatible.public ComplexSquareMatrix multiply(ComplexSquareMatrix m)
public AbstractComplexSquareMatrix directSum(AbstractComplexSquareMatrix m)
directSum in class AbstractComplexSquareMatrixpublic AbstractComplexSquareMatrix tensor(AbstractComplexSquareMatrix m)
tensor in class AbstractComplexSquareMatrixpublic AbstractComplexMatrix hermitianAdjoint()
hermitianAdjoint in class AbstractComplexSquareMatrixpublic AbstractComplexMatrix conjugate()
conjugate in class AbstractComplexSquareMatrixpublic Matrix transpose()
transpose in class AbstractComplexSquareMatrixpublic AbstractComplexSquareMatrix inverse()
inverse in class AbstractComplexSquareMatrixpublic final AbstractComplexSquareMatrix[] luDecompose(int[] pivot)
luDecompose in class AbstractComplexSquareMatrixpublic AbstractComplexSquareMatrix[] polarDecompose()
polarDecompose in class AbstractComplexSquareMatrixpublic AbstractComplexMatrix mapElements(ComplexMapping f)
mapElements in class AbstractComplexSquareMatrixf - a user-defined function
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||