# naginterfaces.library.eigen.real_​gen_​eigsys¶

naginterfaces.library.eigen.real_gen_eigsys(crit, a, wl, wu, mest)[source]

real_gen_eigsys computes selected eigenvalues and eigenvectors of a real general matrix.

For full information please refer to the NAG Library document for f02ec

https://www.nag.com/numeric/nl/nagdoc_29.2/flhtml/f02/f02ecf.html

Parameters
critstr, length 1

Indicates the criterion for selecting eigenvalues.

Eigenvalues are selected according to their moduli: .

Eigenvalues are selected according to their real parts: .

afloat, array-like, shape

The general matrix .

wlfloat

and , the lower and upper bounds on the criterion for the selected eigenvalues (see ).

wufloat

and , the lower and upper bounds on the criterion for the selected eigenvalues (see ).

mestint

must be an upper bound on , the number of eigenvalues and eigenvectors selected. No eigenvectors are computed if .

Returns
afloat, ndarray, shape

Contains the Hessenberg form of the balanced input matrix (see Further Comments).

mint

, the number of eigenvalues actually selected.

wrfloat, ndarray, shape

The first elements of and hold the real and imaginary parts, respectively, of the selected eigenvalues; elements to contain the other eigenvalues. Complex conjugate pairs of eigenvalues are stored in consecutive elements of the arrays, with the eigenvalue having positive imaginary part first. See also Further Comments.

wifloat, ndarray, shape

The first elements of and hold the real and imaginary parts, respectively, of the selected eigenvalues; elements to contain the other eigenvalues. Complex conjugate pairs of eigenvalues are stored in consecutive elements of the arrays, with the eigenvalue having positive imaginary part first. See also Further Comments.

vrfloat, ndarray, shape

Contains the real parts of the selected eigenvectors, with the th column holding the real part of the eigenvector associated with the eigenvalue (stored in and ).

vifloat, ndarray, shape

Contains the imaginary parts of the selected eigenvectors, with the th column holding the imaginary part of the eigenvector associated with the eigenvalue (stored in and ).

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: or .

(errno )

The algorithm failed to converge: only eigenvalues have been computed; no eigenvectors have been computed.

(errno )

There are more than eigenvalues in the specified range. (number of eigenvalues in range) and . No eigenvectors have been computed. Rerun with second dimension of and .

Warns
NagAlgorithmicWarning
(errno )

Inverse iteration failed to compute all the specified eigenvectors. The number of eigenvectors which failed to converge is . The corresponding columns of and are set to zero.

Notes

real_gen_eigsys computes selected eigenvalues and the corresponding right eigenvectors of a real general matrix :