HermitianMatrix

class HermitianMatrix(*args)

Hermitian Matrix.

Available constructors:

HermitianMatrix(dim)

Parameters:
dimint

The dimension of the Hermitian matrix (square matrix with dim rows and dim columns).

Methods

checkHermitian()

Check if the internal representation is really hermitian.

clean(threshold)

Clean the matrix according to a specific threshold.

computeCholesky()

Compute the Cholesky factor.

computeCholeskyInPlace()

Compute the Cholesky factor in place.

conjugate()

Accessor to the conjugate complex matrix.

conjugateTranspose()

Accessor to the transposed conjugate complex matrix.

getClassName()

Accessor to the object's name.

getDimension()

Accessor to the matrix dimension.

getId()

Accessor to the object's id.

getImplementation()

Accessor to the underlying implementation.

getName()

Accessor to the object's name.

getNbColumns()

Accessor to the number of columns.

getNbRows()

Accessor to the number of rows.

imag()

Accessor to the imaginary part.

isEmpty()

Test whether the matrix is empty or not.

real()

Accessor to the real part.

setName(name)

Accessor to the object's name.

solveLinearSystem(*args)

Solve a system of linear equations.

solveLinearSystemInPlace(*args)

Solve a system of linear equations.

transpose()

Accessor to the transposed complex matrix.

See also

ComplexMatrix

Notes

The Hermitian matrix is filled with (0, 0). It is not possible to fill the matrix from a collection of complex values (to be done later).

__init__(*args)
checkHermitian()

Check if the internal representation is really hermitian.

clean(threshold)

Clean the matrix according to a specific threshold.

Parameters:
thresholdpositive float

Numerical sample which is the collection of points stored by the history strategy.

computeCholesky()

Compute the Cholesky factor.

Returns:
GComplexMatrix

The Cholesky factor \mat{G}, i.e. the complex matrix such as \mat{G} \times \Tr{\mat{G}} is the initial matrix.

computeCholeskyInPlace()

Compute the Cholesky factor in place.

Similar to computeCholesky() but modifies the matrix in place to avoid a copy.

conjugate()

Accessor to the conjugate complex matrix.

Returns:
NComplexMatrix

The conjugate matrix \mat{N} of size n_r \times n_c associated with the given complex matrix \mat{M} such as N_{i, j} = \overline{M}_{i, j}.

conjugateTranspose()

Accessor to the transposed conjugate complex matrix.

Returns:
NComplexMatrix

The transposed conjugate matrix \mat{N} of size n_c \times n_r associated with the given complex matrix \mat{M} such as N_{i, j} = \overline{M}_{j, i}.

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

The object class name (object.__class__.__name__).

getDimension()

Accessor to the matrix dimension.

Returns:
dimint

The dimension of the Hermitian matrix.

getId()

Accessor to the object’s id.

Returns:
idint

Internal unique identifier.

getImplementation()

Accessor to the underlying implementation.

Returns:
implImplementation

A copy of the underlying implementation object.

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getNbColumns()

Accessor to the number of columns.

Returns:
ncint

The number of columns of \mat{M}.

getNbRows()

Accessor to the number of rows.

Returns:
nrint

The number of rows of \mat{M}.

imag()

Accessor to the imaginary part.

Returns:
imatMatrix

A real matrix \mat{A} of size n_r \times n_c such A_{i, j} = \mathrm{Im} (M_{i, j}).

isEmpty()

Test whether the matrix is empty or not.

Returns:
isEmptybool

Flag telling whether the dimensions of the matrix is zero.

real()

Accessor to the real part.

Returns:
rmatMatrix

A real matrix \mat{A} of size n_r \times n_c such A_{i, j} = \mathrm{Re} (M_{i, j}).

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

solveLinearSystem(*args)

Solve a system of linear equations.

Parameters:
BComplexMatrix

Second member

Returns:
XComplexMatrix

The solution to A * X = B.

solveLinearSystemInPlace(*args)

Solve a system of linear equations.

Parameters:
BComplexMatrix

Second member

Returns:
XComplexMatrix

The solution to A * X = B.

Notes

Unlike solveLinearSystem() this method does not copy the matrix A and alters it in-place during the resolution, so the content of A may change.

transpose()

Accessor to the transposed complex matrix.

Returns:
NComplexMatrix

The transposed matrix \mat{N} of size n_c \times n_r associated with the given complex matrix \mat{M} such as N_{i, j} = M_{j, i}.

Examples using the class

Create a spectral model

Create a spectral model