|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.algebraic.AbstractHypermatrix
org.jscience.mathematics.algebraic.AbstractMatrix
org.jscience.mathematics.algebraic.matrices.AbstractComplexMatrix
public abstract class AbstractComplexMatrix
The AbstractComplexMatrix class provides an object for encapsulating matrices containing complex numbers.
| Constructor Summary | |
|---|---|
protected |
AbstractComplexMatrix(int rows,
int cols)
Constructs a matrix. |
| Method Summary | |
|---|---|
AbstractDoubleMatrix |
abs()
Applies the abs function on all the matrix components. |
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(AbstractComplexMatrix m,
double tol)
|
boolean |
equals(java.lang.Object obj)
Compares two complex matrices for equality. |
double |
frobeniusNorm()
Returns the Frobenius or Hilbert-Schmidt (l2) norm. |
AbstractComplexVector |
getColumn(int j)
Returns the ith column. |
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. |
Complex[] |
getMatrixAsColumns()
Make a one-dimensional column packed copy of the internal array. |
Complex[] |
getMatrixAsRows()
Make a one-dimensional row packed copy of the internal array. |
abstract Complex |
getPrimitiveElement(int i,
int j)
Returns an element of the matrix. |
double |
getRealElement(int i,
int j)
Returns the real part of an element of the matrix. |
AbstractComplexVector |
getRow(int i)
Returns the ith row. |
java.lang.Object |
getSet()
|
AbstractComplexMatrix |
getSubMatrix(int k1,
int k2,
int k3,
int k4)
Computes a sub matrix from the parameters index. |
int |
hashCode()
Returns a hashcode for this NON EMPTY matrix. |
AbstractComplexMatrix |
hermitianAdjoint()
Returns the hermitian adjoint of this matrix. |
AbstractComplexMatrix |
horizontalAxisSymmetry()
Invert matrix elements order from the top to the bottom. |
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. |
Complex |
mass()
Gets the mass of the matrix components. |
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. |
static AbstractComplexMatrix |
read(java.io.BufferedReader input)
Read a matrix from a stream. |
AbstractDoubleMatrix |
real()
Returns the real part of this complex matrix. |
AbstractComplexMatrix |
reverse()
Invert matrix elements order from the top to the bottom, from the right to the left. |
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. |
void |
setAllElements(Complex m)
Sets the value of all elements of the matrix. |
void |
setColumn(int j,
AbstractComplexVector v)
Returns the ith column. |
abstract 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. |
void |
setRow(int i,
AbstractComplexVector v)
Returns the ith row. |
AbstractComplexMatrix |
setSubMatrix(int k,
int l,
AbstractComplexMatrix m)
Set a sub 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 |
tensorProduct(AbstractComplexMatrix m)
Returns the tensor product of this matrix and another. |
Complex[][] |
toPrimitiveArray()
Projects the matrix to an array. |
java.lang.String |
toString()
Returns a string representing this matrix. |
Matrix |
transpose()
Returns the transpose of this matrix. |
AbstractComplexMatrix |
verticalAxisSymmetry()
Invert matrix elements order from the right to the left. |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractMatrix |
|---|
getElement, getInvalidElementMsg, numColumns, numRows, print, print, print, print, toArray, toArray |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractHypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jscience.mathematics.algebraic.Hypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Constructor Detail |
|---|
protected AbstractComplexMatrix(int rows,
int cols)
| Method Detail |
|---|
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - a complex matrixpublic boolean equals(AbstractComplexMatrix m)
m - a complex matrix
public boolean equals(AbstractComplexMatrix m,
double tol)
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic AbstractDoubleMatrix real()
public AbstractDoubleMatrix imag()
public abstract Complex getPrimitiveElement(int i,
int j)
i - row index of the elementj - column index of the element
IllegalDimensionException - If attempting to access an invalid element.
public Complex getElement(int i,
int j)
i - row index of the elementj - column index of the element
IllegalDimensionException - If attempting to access an invalid element.
public double getRealElement(int i,
int j)
i - row index of the elementj - column index of the element
IllegalDimensionException - If attempting to access an invalid element.
public double getImagElement(int i,
int j)
i - row index of the elementj - column index of the element
IllegalDimensionException - If attempting to access an invalid element.public AbstractComplexVector getRow(int i)
i - DOCUMENT ME!
public AbstractComplexVector getColumn(int j)
j - DOCUMENT ME!
public void setRow(int i,
AbstractComplexVector v)
public void setColumn(int j,
AbstractComplexVector v)
public abstract void setElement(int i,
int j,
Complex z)
i - row index of the elementj - column index of the elementz - a complex number
IllegalDimensionException - If attempting to access an invalid element.
public 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
IllegalDimensionException - If attempting to access an invalid element.public void setAllElements(Complex m)
m - a complex elementpublic final java.lang.Object getSet()
public double infNorm()
-norm.
public double frobeniusNorm()
public AbstractDoubleMatrix abs()
public Complex mass()
public AbelianGroup.Member negate()
public final AbelianGroup.Member add(AbelianGroup.Member m)
m - a group member
public AbstractComplexMatrix add(AbstractComplexMatrix m)
m - a complex matrix
IllegalDimensionException - If the matrices are different sizes.public final AbelianGroup.Member subtract(AbelianGroup.Member m)
m - a group member
public AbstractComplexMatrix subtract(AbstractComplexMatrix m)
m - a complex matrix
IllegalDimensionException - If the matrices are different sizes.public final Module.Member scalarMultiply(Ring.Member x)
x - a ring member
public 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 member
public 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.
IllegalDimensionException - If the matrices are different sizes.public AbstractComplexVector multiply(AbstractComplexVector v)
v - a complex vector
IllegalDimensionException - If the matrix and vector are incompatible.public final Ring.Member multiply(Ring.Member m)
m - a ring member
public AbstractComplexMatrix multiply(AbstractComplexMatrix m)
m - a complex matrix
IllegalDimensionException - If the matrices are incompatible.public AbstractComplexMatrix directSum(AbstractComplexMatrix m)
public AbstractComplexMatrix tensorProduct(AbstractComplexMatrix m)
public AbstractComplexMatrix hermitianAdjoint()
public AbstractComplexMatrix conjugate()
public Matrix transpose()
public AbstractComplexMatrix horizontalAxisSymmetry()
public AbstractComplexMatrix verticalAxisSymmetry()
public AbstractComplexMatrix reverse()
public AbstractComplexMatrix getSubMatrix(int k1,
int k2,
int k3,
int k4)
k1 - the beginning rows indexk2 - the finishing rows indexk3 - the beginning columns indexk4 - the finishing columns index
public AbstractComplexMatrix setSubMatrix(int k,
int l,
AbstractComplexMatrix m)
k - Initial row index to offset the patching matrixl - Initial column index to offset the patching matrixm - the patching matrixpublic AbstractComplexMatrix mapElements(ComplexMapping f)
f - a user-defined function
public Complex[][] toPrimitiveArray()
public Complex[] getMatrixAsRows()
public Complex[] getMatrixAsColumns()
public static AbstractComplexMatrix read(java.io.BufferedReader input)
throws java.io.IOException
input - the input stream.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||