Operator Reference

eigenvalues_general_matrixT_eigenvalues_general_matrixEigenvaluesGeneralMatrixEigenvaluesGeneralMatrixeigenvalues_general_matrix (Operator)

eigenvalues_general_matrixT_eigenvalues_general_matrixEigenvaluesGeneralMatrixEigenvaluesGeneralMatrixeigenvalues_general_matrix — Compute the eigenvalues and optionally the eigenvectors of a general matrix.

Signature

Herror T_eigenvalues_general_matrix(const Htuple MatrixID, const Htuple ComputeEigenvectors, Htuple* EigenvaluesRealID, Htuple* EigenvaluesImagID, Htuple* EigenvectorsRealID, Htuple* EigenvectorsImagID)

void EigenvaluesGeneralMatrix(const HTuple& MatrixID, const HTuple& ComputeEigenvectors, HTuple* EigenvaluesRealID, HTuple* EigenvaluesImagID, HTuple* EigenvectorsRealID, HTuple* EigenvectorsImagID)

void HMatrix::EigenvaluesGeneralMatrix(const HString& ComputeEigenvectors, HMatrix* EigenvaluesRealID, HMatrix* EigenvaluesImagID, HMatrix* EigenvectorsRealID, HMatrix* EigenvectorsImagID) const

void HMatrix::EigenvaluesGeneralMatrix(const char* ComputeEigenvectors, HMatrix* EigenvaluesRealID, HMatrix* EigenvaluesImagID, HMatrix* EigenvectorsRealID, HMatrix* EigenvectorsImagID) const

void HMatrix::EigenvaluesGeneralMatrix(const wchar_t* ComputeEigenvectors, HMatrix* EigenvaluesRealID, HMatrix* EigenvaluesImagID, HMatrix* EigenvectorsRealID, HMatrix* EigenvectorsImagID) const   ( Windows only)

def eigenvalues_general_matrix(matrix_id: HHandle, compute_eigenvectors: str) -> Tuple[HHandle, HHandle, HHandle, HHandle]

Description

The operator eigenvalues_general_matrixeigenvalues_general_matrixEigenvaluesGeneralMatrixEigenvaluesGeneralMatrixeigenvalues_general_matrix computes all eigenvalues and, optionally, the left or right eigenvectors of a square, general Matrix. The matrix is defined by the matrix handle MatrixIDMatrixIDMatrixIDmatrixIDmatrix_id. The computed eigenvectors have the norm 1.

The operator generates the new matrices EigenvaluesReal and EigenvaluesImag with the real and the imaginary parts of the computed eigenvalues. Each matrix has one column and n rows, where n is the number of rows of the input Matrix. In contrast to the operator eigenvalues_symmetric_matrixeigenvalues_symmetric_matrixEigenvaluesSymmetricMatrixEigenvaluesSymmetricMatrixeigenvalues_symmetric_matrix, the order of the eigenvalues is not defined. The operator returns the matrix handles EigenvaluesRealIDEigenvaluesRealIDEigenvaluesRealIDeigenvaluesRealIDeigenvalues_real_id and EigenvaluesImagIDEigenvaluesImagIDEigenvaluesImagIDeigenvaluesImagIDeigenvalues_imag_id. If desired, the real and imaginary parts of the computed eigenvectors are stored in the new matrices EigenvectorsReal and EigenvectorsImag. For this, the operator returns valid matrix handles EigenvectorsRealIDEigenvectorsRealIDEigenvectorsRealIDeigenvectorsRealIDeigenvectors_real_id and EigenvectorsImagIDEigenvectorsImagIDEigenvectorsImagIDeigenvectorsImagIDeigenvectors_imag_id. Access to the elements of the matrix is possible e.g., with the operator get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixget_full_matrix.

The computation type of eigenvectors can be selected via the parameter ComputeEigenvectorsComputeEigenvectorsComputeEigenvectorscomputeEigenvectorscompute_eigenvectors. If ComputeEigenvectorsComputeEigenvectorsComputeEigenvectorscomputeEigenvectorscompute_eigenvectors = 'none'"none""none""none""none", no eigenvectors are computed. If 'left'"left""left""left""left" is selected, the left eigenvalues are computed. If 'right'"right""right""right""right" is selected, the right eigenvalues are computed.

Example:

ComputeEigenvectorsComputeEigenvectorsComputeEigenvectorscomputeEigenvectorscompute_eigenvectors = 'right'"right""right""right""right"

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Processed without parallelization.

Parameters

MatrixIDMatrixIDMatrixIDmatrixIDmatrix_id (input_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle of the input matrix.

ComputeEigenvectorsComputeEigenvectorsComputeEigenvectorscomputeEigenvectorscompute_eigenvectors (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Computation of the eigenvectors.

Default: 'none' "none" "none" "none" "none"

List of values: 'left'"left""left""left""left", 'none'"none""none""none""none", 'right'"right""right""right""right"

EigenvaluesRealIDEigenvaluesRealIDEigenvaluesRealIDeigenvaluesRealIDeigenvalues_real_id (output_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle with the real parts of the eigenvalues.

EigenvaluesImagIDEigenvaluesImagIDEigenvaluesImagIDeigenvaluesImagIDeigenvalues_imag_id (output_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle with the imaginary parts of the eigenvalues.

EigenvectorsRealIDEigenvectorsRealIDEigenvectorsRealIDeigenvectorsRealIDeigenvectors_real_id (output_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle with the real parts of the eigenvectors.

EigenvectorsImagIDEigenvectorsImagIDEigenvectorsImagIDeigenvectorsImagIDeigenvectors_imag_id (output_control)  matrix HMatrix, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Matrix handle with the imaginary parts of the eigenvectors.

Result

If the parameters are valid, the operator eigenvalues_general_matrixeigenvalues_general_matrixEigenvaluesGeneralMatrixEigenvaluesGeneralMatrixeigenvalues_general_matrix returns the value 2 ( H_MSG_TRUE) . If necessary, an exception is raised.

Possible Predecessors

create_matrixcreate_matrixCreateMatrixCreateMatrixcreate_matrix

Possible Successors

get_full_matrixget_full_matrixGetFullMatrixGetFullMatrixget_full_matrix, get_value_matrixget_value_matrixGetValueMatrixGetValueMatrixget_value_matrix, get_diagonal_matrixget_diagonal_matrixGetDiagonalMatrixGetDiagonalMatrixget_diagonal_matrix

See also

eigenvalues_symmetric_matrixeigenvalues_symmetric_matrixEigenvaluesSymmetricMatrixEigenvaluesSymmetricMatrixeigenvalues_symmetric_matrix, generalized_eigenvalues_symmetric_matrixgeneralized_eigenvalues_symmetric_matrixGeneralizedEigenvaluesSymmetricMatrixGeneralizedEigenvaluesSymmetricMatrixgeneralized_eigenvalues_symmetric_matrix, generalized_eigenvalues_general_matrixgeneralized_eigenvalues_general_matrixGeneralizedEigenvaluesGeneralMatrixGeneralizedEigenvaluesGeneralMatrixgeneralized_eigenvalues_general_matrix

References

David Poole: “Linear Algebra: A Modern Introduction”; Thomson; Belmont; 2006.
Gene H. Golub, Charles F. van Loan: “Matrix Computations”; The Johns Hopkins University Press; Baltimore and London; 1996.

Module

Foundation