public class ComplexMatrix extends Object implements GenericMatrix<ComplexMatrix,Complex>
Complex
matrix.Constructor and Description |
---|
ComplexMatrix(Complex[][] data)
Construct a
Complex matrix. |
ComplexMatrix(double[][] data)
Construct a
Complex matrix. |
ComplexMatrix(int nRows,
int nCols)
Construct a
Complex matrix. |
Modifier and Type | Method and Description |
---|---|
ComplexMatrix |
add(ComplexMatrix that)
+ : G × G → G
|
DenseMatrix |
doubleValue()
Construct a
DenseMatrix equivalent of this Complex matrix (rounded if necessary). |
boolean |
equals(Object obj) |
Complex |
get(int row,
int col)
Get the matrix entry at [i,j].
|
int |
hashCode() |
ComplexMatrix |
minus(ComplexMatrix that)
- : G × G → G
The operation "-" is not in the definition of of an additive group but can be deduced.
|
ComplexMatrix |
multiply(ComplexMatrix that)
× : G × G → G
|
int |
nCols()
Gets the number of columns.
|
int |
nRows()
Gets 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.
|
ComplexMatrix |
scaled(Complex scalar)
× : F × V → V
The result of applying this function to a scalar, c, in F and v in V is denoted cv.
|
void |
set(int row,
int col,
Complex value)
Set the matrix entry at [i,j] to a value.
|
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.
|
public ComplexMatrix(int nRows, int nCols)
Complex
matrix.nRows
- the number of rowsnCols
- the number of columnspublic ComplexMatrix(Complex[][] data)
Complex
matrix.data
- a matrix data of Complex
numbers in a 2D arraypublic ComplexMatrix(double[][] data)
Complex
matrix.data
- a matrix data of double
s in a 2D arraypublic int nRows()
Table
public int nCols()
Table
public void set(int row, int col, Complex value)
GenericMatrixAccess
set
in interface GenericMatrixAccess<Complex>
row
- the row indexcol
- the column indexvalue
- the value to set A[i,j] topublic Complex get(int row, int col)
GenericMatrixAccess
get
in interface GenericMatrixAccess<Complex>
row
- the row indexcol
- the column indexpublic ComplexMatrix add(ComplexMatrix that)
AbelianGroup
add
in interface AbelianGroup<ComplexMatrix>
that
- the object to be addedpublic ComplexMatrix minus(ComplexMatrix that)
AbelianGroup
this.add(that.opposite())
.minus
in interface AbelianGroup<ComplexMatrix>
that
- the object to be subtracted (subtrahend)public ComplexMatrix multiply(ComplexMatrix that)
Monoid
multiply
in interface Monoid<ComplexMatrix>
that
- the multiplicandpublic ComplexMatrix scaled(Complex scalar)
VectorSpace
scaled
in interface VectorSpace<ComplexMatrix,Complex>
scalar
- a multiplierpublic ComplexMatrix opposite()
AbelianGroup
this.add(this.opposite()) == this.ZERO
opposite
in interface AbelianGroup<ComplexMatrix>
public ComplexMatrix ZERO()
AbelianGroup
ZERO
in interface AbelianGroup<ComplexMatrix>
public ComplexMatrix ONE()
Monoid
ONE
in interface Monoid<ComplexMatrix>
public DenseMatrix doubleValue()
DenseMatrix
equivalent of this Complex matrix (rounded if necessary).DenseMatrix
equivalentCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.