Skip to content
fn

lapack_eig_f32

void lapack_eig_f32(const float * A, int n, float * wr, float * wi, float * VR, int * info)

General (non-symmetric) eigendecomposition (float32).

Computes eigenvalues of a general real matrix; complex eigenvalues are returned as separate real (wr) and imaginary (wi) parts. Right eigenvectors (columns of VV) are written to VR if non-null.

Math

Avj=λjvj,λj=wrj+i wijA v_j = \lambda_j v_j, \quad \lambda_j = \mathrm{wr}_j + i \, \mathrm{wi}_j

References

LAPACK sgeev_.

Parameters

Aconst float*
Row-major n×nn \times n input.
nint
Side length.
wr, wifloat*
Real / imaginary parts of the eigenvalues, length nn.
VRfloat*
Right-eigenvector matrix (row-major) or nullptr to skip vectors.
infoint*
LAPACK status (> 0 = QR iteration failed to converge).