Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

?lahqr2

Updates the eigenvalues and Schur decomposition.

Syntax

void clahqr2 (const MKL_INT* wantt, const MKL_INT* wantz, const MKL_INT* n, const MKL_INT* ilo, const MKL_INT* ihi, MKL_Complex8* h, const MKL_INT* ldh, MKL_Complex8* w, const MKL_INT* iloz, const MKL_INT* ihiz, MKL_Complex8* z, const MKL_INT* ldz, MKL_INT* info);

void zlahqr2 (const MKL_INT* wantt, const MKL_INT* wantz, const MKL_INT* n, const MKL_INT* ilo, const MKL_INT* ihi, MKL_Complex16* h, const MKL_INT* ldh, MKL_Complex16* w, const MKL_INT* iloz, const MKL_INT* ihiz, MKL_Complex16* z, const MKL_INT* ldz, MKL_INT* info);

Include Files

  • mkl_scalapack.h

Description

?lahqr2 is an auxiliary routine called by ?hseqr to update the eigenvalues and Schur decomposition already computed by ?hseqr, by dealing with the Hessenberg submatrix in rows and columns ilo to ihi. This version of ?lahqr (not the standard LAPACK version) uses a double-shift algorithm (like LAPACK's ?lahqr). Unlike the standard LAPACK convention, this does not assume the subdiagonal is real, nor does it work to preserve this quality if given.

Input Parameters

wantt

0: the full Schur form T is required;

= 0: only eigenvalues are required.

wantz

0: the matrix of Schur vectors Z is required;

= 0: Schur vectors are not required.

n

The order of the matrix H. n >= 0.

ilo, ihi

It is assumed that the matrix H is upper triangular in rows and columns ihi +1 :n, and that matrix element H(ilo,ilo-1) = 0 (unless ilo = 1). ?lahqr works primarily with the Hessenberg submatrix in rows and columns ilo to ihi, but applies transformations to all of h if wantt is nonzero.

1 <= ilo <= max(1,ihi); ihi <= n.

h

Array, size ldh*n.

On entry, the upper Hessenberg matrix H.

ldh

The leading dimension of the array h. ldh >= max(1,n).

iloz, ihiz

Specify the rows of Z to which transformations must be applied if wantz 0.

1 <= iloz <= ilo; ihi <= ihiz <= n.

z

Array, size ldz*n.

If wantz 0, on entry z must contain the current matrix Z of transformations. If wantz= 0, z is not referenced.

ldz

The leading dimension of the array z. ldz >= max(1,n).

Output Parameters

h

On exit, if wantt 0, h is upper triangular in rows and columns ilo:ihi. If wantt= 0, the contents of h are unspecified on exit.

w

Array, size (n)

The computed eigenvalues ilo to ihi are stored in the corresponding elements of w. If wantt 0, the eigenvalues are stored in the same order as on the diagonal of the Schur form returned in h, with w[i] = H(i, i).

z

If wantz 0, on exit z has been updated; transformations are applied only to the submatrix Z(iloz:ihiz,ilo:ihi). If wantz= 0, z is not referenced.

info

= 0: successful exit

> 0: if info = i, ?lahqr failed to compute all the eigenvalues ilo to ihi in a total of 30*(ihi-ilo+1) iterations; elements w[i:ihi - 1] contain those eigenvalues which have been successfully computed.