|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.matrix.generic.matrixtype.ComplexMatrix
public class ComplexMatrix
This class represents a matrix of Complex numbers.
| Constructor Summary | |
|---|---|
ComplexMatrix(Complex[][] data)
Construct a matrix from a 2D array of Complex numbers. |
|
ComplexMatrix(double[][] data)
Construct a ComplexMatrix from a 2D array of doubles. |
|
ComplexMatrix(int nRows,
int nCols)
Construct a nRows x nCols matrix of Complex numbers. |
|
| Method Summary | |
|---|---|
ComplexMatrix |
add(ComplexMatrix that)
+ : G × G → G |
DenseMatrix |
doubleValue()
Create a DenseMatrix of double values from this complex matrix. |
boolean |
equals(java.lang.Object obj)
|
Complex |
get(int row,
int col)
Get the matrix element at [row, col]. |
int |
hashCode()
|
ComplexMatrix |
minus(ComplexMatrix that)
- : G × G → G
- is not in the definition of of an additive group but can be deduced. |
ComplexMatrix |
multiply(ComplexMatrix that)
· : G × G → G |
int |
nCols()
Get the number of columns. |
int |
nRows()
Get the number of rows. |
ComplexMatrix |
ONE()
The multiplicative element 1 in the group such that for any elements a in the group,
the equation
1 × a = a × 1 = a
holds. |
ComplexMatrix |
opposite()
For each a in G, there exists an element b in G such that a + b = b + a = 0
That is, it is the object such as
this.add(this.opposite()) == this.ZERO |
ComplexMatrix |
scaled(Complex scalar)
* : F × V → V
The result of applying this function to scalar, c, in F and v in V is denoted cv. |
void |
set(int row,
int col,
Complex value)
Set the matrix element at [row, col] to value. |
java.lang.String |
toString()
|
ComplexMatrix |
ZERO()
The additive element 0 in the group, such that for all elements a in the group,
the equation 0 + a = a + 0 = a holds. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ComplexMatrix(int nRows,
int nCols)
nRows x nCols matrix of Complex numbers.
nRows - number of rowsnCols - number of columnspublic ComplexMatrix(Complex[][] data)
Complex numbers.
data - a matrix arrangement of Complex numbers in a 2D arraypublic ComplexMatrix(double[][] data)
data - a matrix arrangement of doubles in a 2D array| Method Detail |
|---|
public int nRows()
MatrixDimension
nRows in interface MatrixDimensionpublic int nCols()
MatrixDimension
nCols in interface MatrixDimension
public void set(int row,
int col,
Complex value)
MatrixAccessor[row, col] to value.
This is the only function that may change the entries of a matrix.
set in interface MatrixAccessor<Complex>row - the row indexcol - the column indexvalue - the value to set A[row, col] to
public Complex get(int row,
int col)
MatrixAccessor[row, col].
get in interface MatrixAccessor<Complex>row - the row indexcol - the column index
A[row, col]public ComplexMatrix add(ComplexMatrix that)
AbelianGroup+ : G × G → G
add in interface AbelianGroup<ComplexMatrix>that - the object to be added
this + thatpublic ComplexMatrix minus(ComplexMatrix that)
AbelianGroup- : G × G → G
- is not in the definition of of an additive group but can be deduced.
This function is provided for convenience purpose.
It is equivalent to
this.add(that.opposite())
minus in interface AbelianGroup<ComplexMatrix>that - the object to be subtracted (subtrahend)
this - thatpublic ComplexMatrix multiply(ComplexMatrix that)
Monoid· : G × G → G
multiply in interface Monoid<ComplexMatrix>that - the multiplicand
this × thatpublic ComplexMatrix scaled(Complex scalar)
VectorSpace* : F × V → V
The result of applying this function to scalar, c, in F and v in V is denoted cv.
scaled in interface VectorSpace<ComplexMatrix,Complex>scalar - a multiplier
scalar * thispublic ComplexMatrix opposite()
AbelianGroupa + b = b + a = 0
That is, it is the object such as
this.add(this.opposite()) == this.ZERO
opposite in interface AbelianGroup<ComplexMatrix>-thispublic ComplexMatrix ZERO()
AbelianGroupa in the group,
the equation 0 + a = a + 0 = a holds.
ZERO in interface AbelianGroup<ComplexMatrix>0public ComplexMatrix ONE()
Monoida in the group,
the equation
1 × a = a × 1 = a
holds.
ONE in interface Monoid<ComplexMatrix>1public DenseMatrix doubleValue()
java.lang.IllegalArgumentException - if any element is not a doublepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||