|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.maths.matrices.Matrix JSci.maths.matrices.AbstractComplexMatrix
The AbstractComplexMatrix class provides an object for encapsulating matrices containing complex numbers.
Field Summary |
Fields inherited from class JSci.maths.matrices.Matrix |
numCols, numRows |
Constructor Summary | |
protected |
AbstractComplexMatrix(int rows,
int cols)
Constructs a matrix. |
Method Summary | |
AbelianGroup.Member |
add(AbelianGroup.Member m)
Returns the addition of this matrix and another. |
AbstractComplexMatrix |
add(AbstractComplexMatrix m)
Returns the addition of this matrix and another. |
AbstractComplexMatrix |
conjugate()
Returns the complex conjugate of this matrix. |
AbstractComplexMatrix |
directSum(AbstractComplexMatrix m)
Returns the direct sum of this matrix and another. |
boolean |
equals(AbstractComplexMatrix m)
Compares two complex matrices for equality. |
boolean |
equals(java.lang.Object obj)
Compares two complex matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius or Hilbert-Schmidt (l2) norm. |
abstract Complex |
getElement(int i,
int j)
Returns an element of the matrix. |
abstract double |
getImagElement(int i,
int j)
Returns the imag part of an element of the matrix. |
abstract double |
getRealElement(int i,
int j)
Returns the real part of an element of the matrix. |
int |
hashCode()
Returns a hashcode for this 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. |
AbstractComplexMatrix |
mapElements(ComplexMapping f)
Applies a function on all the matrix elements. |
AbstractComplexMatrix |
multiply(AbstractComplexMatrix m)
Returns the multiplication of this matrix and another. |
AbstractComplexVector |
multiply(AbstractComplexVector v)
Returns the multiplication of a vector by this matrix. |
Ring.Member |
multiply(Ring.Member m)
Returns the multiplication of this matrix and another. |
AbelianGroup.Member |
negate()
Returns the negative of this matrix. |
AbstractDoubleMatrix |
real()
Returns the real part of this complex matrix. |
AbstractComplexMatrix |
scalarDivide(Complex z)
Returns the division of this matrix by a scalar. |
AbstractComplexMatrix |
scalarDivide(double x)
Returns the division of this matrix by a scalar. |
VectorSpace.Member |
scalarDivide(Field.Member x)
Returns the division of this matrix by a scalar. |
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. |
Module.Member |
scalarMultiply(Ring.Member x)
Returns the multiplication of this matrix by a scalar. |
Complex |
scalarProduct(AbstractComplexMatrix m)
Returns the scalar product of this matrix and another. |
abstract void |
setElement(int i,
int j,
Complex z)
Sets the value of an element of the matrix. |
abstract void |
setElement(int i,
int j,
double x,
double y)
Sets the value of an element of the matrix. |
AbelianGroup.Member |
subtract(AbelianGroup.Member m)
Returns the subtraction of this matrix by another. |
AbstractComplexMatrix |
subtract(AbstractComplexMatrix m)
Returns the subtraction of this matrix by another. |
AbstractComplexMatrix |
tensor(AbstractComplexMatrix m)
Returns the tensor product of this matrix and another. |
java.lang.String |
toString()
Returns a string representing this matrix. |
Matrix |
transpose()
Returns the transpose of this matrix. |
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 |
Constructor Detail |
protected AbstractComplexMatrix(int rows, int cols)
Method Detail |
public final boolean equals(java.lang.Object obj)
obj
- a complex matrixpublic boolean equals(AbstractComplexMatrix m)
public java.lang.String toString()
public int hashCode()
public AbstractDoubleMatrix real()
public AbstractDoubleMatrix imag()
public abstract Complex getElement(int i, int j)
i
- row index of the elementj
- column index of the element
MatrixDimensionException
- If attempting to access an invalid element.public abstract double getRealElement(int i, int j)
i
- row index of the elementj
- column index of the element
MatrixDimensionException
- If attempting to access an invalid element.public abstract double getImagElement(int i, int j)
i
- row index of the elementj
- column index of the element
MatrixDimensionException
- If attempting to access an invalid element.public abstract void setElement(int i, int j, Complex z)
i
- row index of the elementj
- column index of the elementz
- a complex number
MatrixDimensionException
- If attempting to access an invalid element.public abstract void setElement(int i, int j, double x, double y)
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 double infNorm()
public double frobeniusNorm()
public AbelianGroup.Member negate()
public final AbelianGroup.Member add(AbelianGroup.Member m)
m
- a group memberpublic AbstractComplexMatrix add(AbstractComplexMatrix m)
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public final AbelianGroup.Member subtract(AbelianGroup.Member m)
m
- a group memberpublic AbstractComplexMatrix subtract(AbstractComplexMatrix m)
m
- a complex matrix
MatrixDimensionException
- If the matrices are different sizes.public final Module.Member scalarMultiply(Ring.Member x)
x
- a ring memberpublic AbstractComplexMatrix scalarMultiply(Complex z)
z
- a complex number
public AbstractComplexMatrix scalarMultiply(double x)
x
- a double
public final VectorSpace.Member scalarDivide(Field.Member x)
x
- a field memberpublic AbstractComplexMatrix scalarDivide(Complex z)
z
- a complex number
public AbstractComplexMatrix scalarDivide(double x)
x
- a double
public Complex scalarProduct(AbstractComplexMatrix m)
m
- a complex matrix.
MatrixDimensionException
- If the matrices are different sizes.public AbstractComplexVector multiply(AbstractComplexVector v)
v
- a complex vector
DimensionException
- If the matrix and vector are incompatible.public final Ring.Member multiply(Ring.Member m)
m
- a ring memberpublic AbstractComplexMatrix multiply(AbstractComplexMatrix m)
m
- a complex matrix
MatrixDimensionException
- If the matrices are incompatible.public AbstractComplexMatrix directSum(AbstractComplexMatrix m)
public AbstractComplexMatrix tensor(AbstractComplexMatrix m)
public AbstractComplexMatrix hermitianAdjoint()
public AbstractComplexMatrix conjugate()
public Matrix transpose()
transpose
in class Matrix
public AbstractComplexMatrix mapElements(ComplexMapping f)
f
- a user-defined function
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |