eig#

Perform an eigenvalue decomposition for Hermitian or real symmetric matrices.

template<typename OpA>
__MATX_INLINE__ auto matx::eig(const OpA &a, EigenMode jobz = EigenMode::VECTOR, SolverFillMode uplo = SolverFillMode::UPPER)#

Performs an eigenvalue decomposition, computing the eigenvalues, and optionally the eigenvectors, for a Hermitian or real symmetric matrix.

If rank > 2, operations are batched.

Template Parameters:

OpA – Data type of input a tensor or operator

Parameters:
  • a – Input Hermitian/symmetric tensor or operator of shape ... x n x n

  • jobz – Whether to compute eigenvectors.

  • uplo – Part of matrix to fill

Returns:

Operator that produces eigenvectors and eigenvalues tensors. Regardless of jobz, both tensors must be correctly setup for the operation and used with mtie().

  • Eigenvectors - The eigenvectors tensor of shape ... x n x n where each column contains the normalized eigenvectors.

  • Eigenvalues - The eigenvalues tensor of shape ... x n. This must be real and match the inner type of the input/output tensors.

Enums#

The following enums are used for configuring the behavior of Eig operations.

enum class matx::EigenMode#

Specifies whether or not eigenvectors should be computed.

Values:

enumerator NO_VECTOR#

Only eigenvalues are computed

enumerator VECTOR#

Both eigenvalues and eigenvectors are computed

Examples#

// Note that eigenvalue/vector solutions are not necessarily ordered in the same way other libraries
// may order them. When comparing against other libraries it's best to check A*v = lambda * v
(mtie(Evv, Wov) = eig(Bv)).run(this->exec);