public final class ComplexMatrix extends Matrix<Complex>
This class represents an optimized matrix implementation
for complex numbers.
Instances of this class can be created from ComplexVector,
either as rows or columns if the matrix is transposed. For example:[code]
ComplexVector
| Modifier and Type | Method and Description |
|---|---|
ComplexMatrix |
adjoint()
Returns the adjoint of this matrix.
|
Complex |
cofactor(int i,
int j)
Returns the cofactor of an element in this matrix.
|
ComplexMatrix |
copy()
Returns a copy of this matrix
allocated
by the calling thread (possibly on the stack). |
Complex |
determinant()
Returns the determinant of this matrix.
|
Complex |
get(int i,
int j)
Returns a single element from this matrix.
|
ComplexVector |
getColumn(int j)
Returns the column identified by the specified index in this matrix.
|
ComplexVector |
getDiagonal()
Returns the diagonal vector.
|
int |
getNumberOfColumns()
Returns the number of columns
n for this matrix. |
int |
getNumberOfRows()
Returns the number of rows
m for this matrix. |
ComplexVector |
getRow(int i)
Returns the row identified by the specified index in this matrix.
|
ComplexMatrix |
inverse()
Returns the inverse of this matrix (must be square).
|
ComplexMatrix |
minus(Matrix<Complex> that)
Returns the difference between this matrix and the one specified.
|
ComplexMatrix |
opposite()
Returns the negation of this matrix.
|
ComplexMatrix |
plus(Matrix<Complex> that)
Returns the sum of this matrix with the one specified.
|
ComplexMatrix |
tensor(Matrix<Complex> that)
Returns the linear algebraic matrix tensor product of this matrix
and another (Kronecker product).
|
ComplexMatrix |
times(Complex k)
Returns the product of this matrix by the specified factor.
|
ComplexMatrix |
times(Matrix<Complex> that)
Returns the product of this matrix with the one specified.
|
ComplexVector |
times(Vector<Complex> v)
Returns the product of this matrix by the specified vector.
|
ComplexMatrix |
transpose()
Returns the transpose of this matrix.
|
static ComplexMatrix |
valueOf(Complex[][] elements)
Returns a complex matrix from the specified 2-dimensional array.
|
static ComplexMatrix |
valueOf(ComplexVector... rows)
Returns a complex matrix holding the specified row vectors
(column vectors if
transposed). |
static ComplexMatrix |
valueOf(List<ComplexVector> rows)
Returns a complex matrix holding the row vectors from the specified
collection (column vectors if
transposed). |
static ComplexMatrix |
valueOf(Matrix<Complex> that)
Returns a complex matrix equivalent to the specified matrix.
|
ComplexVector |
vectorization()
Returns the vectorization of this matrix.
|
public static ComplexMatrix valueOf(Complex[][] elements)
elements - this matrix elements.DimensionException - if rows have different length.ComplexVectorpublic static ComplexMatrix valueOf(ComplexVector... rows)
transposed).rows - the row vectors.DimensionException - if the rows do not have the same dimension.public static ComplexMatrix valueOf(List<ComplexVector> rows)
transposed).rows - the list of row vectors.DimensionException - if the rows do not have the same dimension.public static ComplexMatrix valueOf(Matrix<Complex> that)
that - the matrix to convert.that or a complex matrix holding the same elements
as the specified matrix.public int getNumberOfRows()
Matrixm for this matrix.getNumberOfRows in class Matrix<Complex>public int getNumberOfColumns()
Matrixn for this matrix.getNumberOfColumns in class Matrix<Complex>public Complex get(int i, int j)
Matrixpublic ComplexVector getRow(int i)
Matrixpublic ComplexVector getColumn(int j)
Matrixpublic ComplexVector getDiagonal()
MatrixgetDiagonal in class Matrix<Complex>public ComplexMatrix opposite()
Matrixpublic ComplexMatrix plus(Matrix<Complex> that)
Matrixpublic ComplexMatrix minus(Matrix<Complex> that)
Matrixpublic ComplexMatrix times(Complex k)
Matrixpublic ComplexVector times(Vector<Complex> v)
Matrixpublic ComplexMatrix times(Matrix<Complex> that)
Matrixpublic ComplexMatrix inverse()
Matrixpublic Complex determinant()
Matrixdeterminant in class Matrix<Complex>public ComplexMatrix transpose()
Matrixpublic Complex cofactor(int i, int j)
Matrixpublic ComplexMatrix adjoint()
Matrixpublic ComplexMatrix tensor(Matrix<Complex> that)
MatrixDenseMatrix.tensor in class Matrix<Complex>that - the second matrix.this ⊗ thatpublic ComplexVector vectorization()
MatrixDenseVector.vectorization in class Matrix<Complex>public ComplexMatrix copy()
Matrixallocated
by the calling thread (possibly on the stack).