\n\n\n\nComplexMatrix\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\n\n\n\n\n
\n
\n
\n\n\n\n
\n
org.jscience.mathematics.vector
\n

## Class ComplexMatrix

\n
\n
\n
\n
\n
\n
\n
\n
\n
• \n\n
\n
• \n\n\n

### Method Summary

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
Methods
Modifier and TypeMethod and Description
`ComplexMatrix``adjoint()`\n
Returns the adjoint of this matrix.
\n
`Complex``cofactor(int i,\n int j)`\n
Returns the cofactor of an element in this matrix.
\n
`ComplexMatrix``copy()`\n
Returns a copy of this matrix \n `allocated` \n by the calling thread (possibly on the stack).
\n
`Complex``determinant()`\n
Returns the determinant of this matrix.
\n
`Complex``get(int i,\n int j)`\n
Returns a single element from this matrix.
\n
`ComplexVector``getColumn(int j)`\n
Returns the column identified by the specified index in this matrix.
\n
`ComplexVector``getDiagonal()`\n
Returns the diagonal vector.
\n
`int``getNumberOfColumns()`\n
Returns the number of columns `n` for this matrix.
\n
`int``getNumberOfRows()`\n
Returns the number of rows `m` for this matrix.
\n
`ComplexVector``getRow(int i)`\n
Returns the row identified by the specified index in this matrix.
\n
`ComplexMatrix``inverse()`\n
Returns the inverse of this matrix (must be square).
\n
`ComplexMatrix``minus(Matrix<Complex> that)`\n
Returns the difference between this matrix and the one specified.
\n
`ComplexMatrix``opposite()`\n
Returns the negation of this matrix.
\n
`ComplexMatrix``plus(Matrix<Complex> that)`\n
Returns the sum of this matrix with the one specified.
\n
`ComplexMatrix``tensor(Matrix<Complex> that)`\n
Returns the linear algebraic matrix tensor product of this matrix\n and another (Kronecker product).
\n
`ComplexMatrix``times(Complex k)`\n
Returns the product of this matrix by the specified factor.
\n
`ComplexMatrix``times(Matrix<Complex> that)`\n
Returns the product of this matrix with the one specified.
\n
`ComplexVector``times(Vector<Complex> v)`\n
Returns the product of this matrix by the specified vector.
\n
`ComplexMatrix``transpose()`\n
Returns the transpose of this matrix.
\n
`static ComplexMatrix``valueOf(Complex[][] elements)`\n
Returns a complex matrix from the specified 2-dimensional array.
\n
`static ComplexMatrix``valueOf(ComplexVector... rows)`\n
Returns a complex matrix holding the specified row vectors \n (column vectors if `transposed`).
\n
`static ComplexMatrix``valueOf(List<ComplexVector> rows)`\n
Returns a complex matrix holding the row vectors from the specified \n collection (column vectors if `transposed`).
\n
`static ComplexMatrix``valueOf(Matrix<Complex> that)`\n
Returns a complex matrix equivalent to the specified matrix.
\n
`ComplexVector``vectorization()`\n
Returns the vectorization of this matrix.
\n
\n
\n
• \n\n\n

### Methods inherited from class org.jscience.mathematics.vector.Matrix

\n`divide, equals, equals, hashCode, isSquare, pow, pseudoInverse, solve, solve, toString, toText, trace`
• \n
\n
\n
• \n\n\n

### Methods inherited from class java.lang.Object

\n`getClass, notify, notifyAll, wait, wait, wait`
• \n
\n
• \n
\n
• \n
\n
\n
\n
\n
• \n\n
\n
• \n\n\n

### Method Detail

\n\n\n\n
\n
• \n

#### valueOf

\n
`public static ComplexMatrix valueOf(Complex[][] elements)`
\n
Returns a complex matrix from the specified 2-dimensional array.\n The first dimension being the row and the second being the column.
\n
Parameters:
`elements` - this matrix elements.
\n
Returns:
the matrix having the specified elements.
\n
Throws:
\n
`DimensionException` - if rows have different length.
`ComplexVector`
\n
• \n
\n\n\n\n
\n
• \n

#### valueOf

\n
`public static ComplexMatrix valueOf(ComplexVector... rows)`
\n
Returns a complex matrix holding the specified row vectors \n (column vectors if `transposed`).
\n
Parameters:
`rows` - the row vectors.
\n
Returns:
the matrix having the specified rows.
\n
Throws:
\n
`DimensionException` - if the rows do not have the same dimension.
\n
• \n
\n\n\n\n
\n
• \n

#### valueOf

\n
`public static ComplexMatrix valueOf(List<ComplexVector> rows)`
\n
Returns a complex matrix holding the row vectors from the specified \n collection (column vectors if `transposed`).
\n
Parameters:
`rows` - the list of row vectors.
\n
Returns:
the matrix having the specified rows.
\n
Throws:
\n
`DimensionException` - if the rows do not have the same dimension.
\n
• \n
\n\n\n\n
\n
• \n

#### valueOf

\n
`public static ComplexMatrix valueOf(Matrix<Complex> that)`
\n
Returns a complex matrix equivalent to the specified matrix.
\n
Parameters:
`that` - the matrix to convert.
\n
Returns:
`that` or a complex matrix holding the same elements\n as the specified matrix.
\n
• \n
\n\n\n\n
\n
• \n

#### getNumberOfRows

\n
`public int getNumberOfRows()`
\n
Description copied from class: `Matrix`
\n
Returns the number of rows `m` for this matrix.
\n
\n
Specified by:
\n
`getNumberOfRows` in class `Matrix<Complex>`
\n
Returns:
m, the number of rows.
\n
• \n
\n\n\n\n
\n
• \n

#### getNumberOfColumns

\n
`public int getNumberOfColumns()`
\n
Description copied from class: `Matrix`
\n
Returns the number of columns `n` for this matrix.
\n
\n
Specified by:
\n
`getNumberOfColumns` in class `Matrix<Complex>`
\n
Returns:
n, the number of columns.
\n
• \n
\n\n\n\n
\n
• \n

#### get

\n
`public Complex get(int i,\n          int j)`
\n
Description copied from class: `Matrix`
\n
Returns a single element from this matrix.
\n
\n
Specified by:
\n
`get` in class `Matrix<Complex>`
\n
Parameters:
`i` - the row index (range [0..m[).
`j` - the column index (range [0..n[).
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### getRow

\n
`public ComplexVector getRow(int i)`
\n
Description copied from class: `Matrix`
\n
Returns the row identified by the specified index in this matrix.
\n
\n
Specified by:
\n
`getRow` in class `Matrix<Complex>`
\n
Parameters:
`i` - the row index (range [0..m[).
\n
Returns:
the vector holding the specified row.
\n
• \n
\n\n\n\n
\n
• \n

#### getColumn

\n
`public ComplexVector getColumn(int j)`
\n
Description copied from class: `Matrix`
\n
Returns the column identified by the specified index in this matrix.
\n
\n
Specified by:
\n
`getColumn` in class `Matrix<Complex>`
\n
Parameters:
`j` - the column index (range [0..n[).
\n
Returns:
the vector holding the specified column.
\n
• \n
\n\n\n\n
\n
• \n

#### getDiagonal

\n
`public ComplexVector getDiagonal()`
\n
Description copied from class: `Matrix`
\n
Returns the diagonal vector.
\n
\n
Specified by:
\n
`getDiagonal` in class `Matrix<Complex>`
\n
Returns:
the vector holding the diagonal elements.
\n
• \n
\n\n\n\n
\n
• \n

#### opposite

\n
`public ComplexMatrix opposite()`
\n
Description copied from class: `Matrix`
\n
Returns the negation of this matrix.
\n
\n
Specified by:
\n
`opposite` in interface `GroupAdditive<Matrix<Complex>>`
\n
Specified by:
\n
`opposite` in class `Matrix<Complex>`
\n
Returns:
`-this`.
\n
• \n
\n\n\n\n
\n
• \n

#### plus

\n
`public ComplexMatrix plus(Matrix<Complex> that)`
\n
Description copied from class: `Matrix`
\n
Returns the sum of this matrix with the one specified.
\n
\n
Specified by:
\n
`plus` in interface `GroupAdditive<Matrix<Complex>>`
\n
Specified by:
\n
`plus` in class `Matrix<Complex>`
\n
Parameters:
`that` - the matrix to be added.
\n
Returns:
`this + that`.
\n
• \n
\n\n\n\n
\n
• \n

#### minus

\n
`public ComplexMatrix minus(Matrix<Complex> that)`
\n
Description copied from class: `Matrix`
\n
Returns the difference between this matrix and the one specified.
\n
\n
Overrides:
\n
`minus` in class `Matrix<Complex>`
\n
Parameters:
`that` - the matrix to be subtracted.
\n
Returns:
`this - that`.
\n
• \n
\n\n\n\n
\n
• \n

#### times

\n
`public ComplexMatrix times(Complex k)`
\n
Description copied from class: `Matrix`
\n
Returns the product of this matrix by the specified factor.
\n
\n
Specified by:
\n
`times` in interface `VectorSpace<Matrix<Complex>,Complex>`
\n
Specified by:
\n
`times` in class `Matrix<Complex>`
\n
Parameters:
`k` - the coefficient multiplier.
\n
Returns:
`this \xc2\xb7 k`
\n
• \n
\n\n\n\n
\n
• \n

#### times

\n
`public ComplexVector times(Vector<Complex> v)`
\n
Description copied from class: `Matrix`
\n
Returns the product of this matrix by the specified vector.
\n
\n
Specified by:
\n
`times` in class `Matrix<Complex>`
\n
Parameters:
`v` - the vector.
\n
Returns:
`this \xc2\xb7 v`
\n
• \n
\n\n\n\n
\n
• \n

#### times

\n
`public ComplexMatrix times(Matrix<Complex> that)`
\n
Description copied from class: `Matrix`
\n
Returns the product of this matrix with the one specified.
\n
\n
Specified by:
\n
`times` in interface `Ring<Matrix<Complex>>`
\n
Specified by:
\n
`times` in class `Matrix<Complex>`
\n
Parameters:
`that` - the matrix multiplier.
\n
Returns:
`this \xc2\xb7 that`.
\n
• \n
\n\n\n\n
\n
• \n

#### inverse

\n
`public ComplexMatrix inverse()`
\n
Description copied from class: `Matrix`
\n
Returns the inverse of this matrix (must be square).
\n
\n
Specified by:
\n
`inverse` in class `Matrix<Complex>`
\n
Returns:
`1 / this`
\n
• \n
\n\n\n\n
\n
• \n

#### determinant

\n
`public Complex determinant()`
\n
Description copied from class: `Matrix`
\n
Returns the determinant of this matrix.
\n
\n
Specified by:
\n
`determinant` in class `Matrix<Complex>`
\n
Returns:
this matrix determinant.
\n
• \n
\n\n\n\n
\n
• \n

#### transpose

\n
`public ComplexMatrix transpose()`
\n
Description copied from class: `Matrix`
\n
Returns the transpose of this matrix.
\n
\n
Specified by:
\n
`transpose` in class `Matrix<Complex>`
\n
Returns:
`A\'`.
\n
• \n
\n\n\n\n
\n
• \n

#### cofactor

\n
`public Complex cofactor(int i,\n               int j)`
\n
Description copied from class: `Matrix`
\n
Returns the cofactor of an element in this matrix. It is the value\n obtained by evaluating the determinant formed by the elements not in\n that particular row or column.
\n
\n
Specified by:
\n
`cofactor` in class `Matrix<Complex>`
\n
Parameters:
`i` - the row index.
`j` - the column index.
\n
Returns:
the cofactor of `THIS[i,j]`.
\n
• \n
\n\n\n\n
\n
• \n

\n
`public ComplexMatrix adjoint()`
\n
Description copied from class: `Matrix`
\n
Returns the adjoint of this matrix. It is obtained by replacing each\n element in this matrix with its cofactor and applying a + or - sign\n according (-1)**(i+j), and then finding the transpose of the resulting\n matrix.
\n
\n
Specified by:
\n
`adjoint` in class `Matrix<Complex>`
\n
Returns:
\n
• \n
\n\n\n\n
\n
• \n

#### tensor

\n
`public ComplexMatrix tensor(Matrix<Complex> that)`
\n
Description copied from class: `Matrix`
\n
Returns the linear algebraic matrix tensor product of this matrix\n and another (Kronecker product). The default implementation returns\n a `DenseMatrix`.
\n
\n
Specified by:
\n
`tensor` in class `Matrix<Complex>`
\n
Parameters:
`that` - the second matrix.
\n
Returns:
`this ⊗ that`
\n Wikipedia: Kronecker Product
\n
• \n
\n\n\n\n
\n
• \n

#### vectorization

\n
`public ComplexVector vectorization()`
\n
Description copied from class: `Matrix`
\n
Returns the vectorization of this matrix. The vectorization of \n a matrix is the column vector obtain by stacking the columns of the\n matrix on top of one another. The default implementation returns \n a `DenseVector`.
\n
\n
Specified by:
\n
`vectorization` in class `Matrix<Complex>`
\n
Returns:
the vectorization of this matrix.
\n Wikipedia: Vectorization.
\n
• \n
\n\n\n\n
\n
• \n

#### copy

\n
`public ComplexMatrix copy()`
\n
Description copied from class: `Matrix`
\n
Returns a copy of this matrix \n `allocated` \n by the calling thread (possibly on the stack).
\n
\n
Specified by:
\n
`copy` in interface `javolution.lang.ValueType`
\n
Specified by:
\n
`copy` in class `Matrix<Complex>`
\n
Returns:
an identical and independant copy of this matrix.
\n
• \n
\n
• \n
\n
• \n
\n
\n
\n\n\n
\n\n\n\n\n
\n
\n
\n\n\n