?tgsna
?tgsna
Estimates reciprocal condition numbers for specified eigenvalues and/or eigenvectors of a pair of matrices in generalized real Schur canonical form.
Syntax
lapack_int LAPACKE_stgsna
(
int
matrix_layout
,
char
job
,
char
howmny
,
const lapack_logical*
select
,
lapack_int
n
,
const float*
a
,
lapack_int
lda
,
const float*
b
,
lapack_int
ldb
,
const float*
vl
,
lapack_int
ldvl
,
const float*
vr
,
lapack_int
ldvr
,
float*
s
,
float*
dif
,
lapack_int
mm
,
lapack_int*
m
);
lapack_int LAPACKE_dtgsna
(
int
matrix_layout
,
char
job
,
char
howmny
,
const lapack_logical*
select
,
lapack_int
n
,
const double*
a
,
lapack_int
lda
,
const double*
b
,
lapack_int
ldb
,
const double*
vl
,
lapack_int
ldvl
,
const double*
vr
,
lapack_int
ldvr
,
double*
s
,
double*
dif
,
lapack_int
mm
,
lapack_int*
m
);
lapack_int LAPACKE_ctgsna
(
int
matrix_layout
,
char
job
,
char
howmny
,
const lapack_logical*
select
,
lapack_int
n
,
const lapack_complex_float*
a
,
lapack_int
lda
,
const lapack_complex_float*
b
,
lapack_int
ldb
,
const lapack_complex_float*
vl
,
lapack_int
ldvl
,
const lapack_complex_float*
vr
,
lapack_int
ldvr
,
float*
s
,
float*
dif
,
lapack_int
mm
,
lapack_int*
m
);
lapack_int LAPACKE_ztgsna
(
int
matrix_layout
,
char
job
,
char
howmny
,
const lapack_logical*
select
,
lapack_int
n
,
const lapack_complex_double*
a
,
lapack_int
lda
,
const lapack_complex_double*
b
,
lapack_int
ldb
,
const lapack_complex_double*
vl
,
lapack_int
ldvl
,
const lapack_complex_double*
vr
,
lapack_int
ldvr
,
double*
s
,
double*
dif
,
lapack_int
mm
,
lapack_int*
m
);
Include Files
- mkl.h
Description
The real flavors , ) with orthogonal matrices
stgsna
/dtgsna
of this routine estimate reciprocal condition numbers for specified eigenvalues and/or eigenvectors of a matrix pair (A
, B
) in generalized real Schur canonical form (or of any matrix pair (Q
*A*
Z
T
Q*
B*
Z
T
Q
and Z
.The complex flavors
ctgsna
/ztgsna
estimate reciprocal condition numbers for specified eigenvalues and/or eigenvectors of a matrix pair (A
, B
). (A
, B
) must be in generalized Schur canonical form, that is, A
and B
are both upper triangular. Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- job
- Specifies whether condition numbers are required for eigenvalues or eigenvectors. Must be'E'or'V'or'B'.If, for eigenvalues only (computejob='E's).If, for eigenvectors only (computejob='V'dif).If, for both eigenvalues and eigenvectors (compute bothjob='B'sanddif).
- howmny
- Must be'A'or'S'.If, compute condition numbers for all eigenpairs.howmny='A'If, compute condition numbers for selected eigenpairs specified by the logical arrayhowmny='S'select.
- select
- Array, size at least max (1,n).If,howmny='S'selectspecifies the eigenpairs for which condition numbers are required.If,howmny='A'selectis not referenced.For real flavors:To select condition numbers for the eigenpair corresponding to a real eigenvalueω,jselect[must be set toj- 1]1; to select condition numbers corresponding to a complex conjugate pair of eigenvaluesωandjω, eitherj+ 1select[orj- 1]select[must be set toj]1.For complex flavors:To select condition numbers for the correspondingj-th eigenvalue and/or eigenvector,select[must be set toj- 1]1.
- n
- The order of the square matrix pair (A,B)(n≥0).
- a,b,vl,vr
- Arrays:a(size max(1,contains the upper quasi-triangular (for real flavors) or upper triangular (for complex flavors) matrixlda*n))Ain the pair (A,B).b(size max(1,contains the upper triangular matrixldb*n))Bin the pair (A,B).Iforjob='E''B',vl(size max(1,must contain left eigenvectors of (ldvl*m) for column major layout and max(1,ldvl*n) for row major layout)A,B), corresponding to the eigenpairs specified byhowmnyandselect. The eigenvectors must be stored in consecutive columns ofvl, as returned by?tgevc.If,job='V'vlis not referenced.Iforjob='E''B',vr(size max(1,must contain right eigenvectors of (ldvr*m) for column major layout and max(1,ldvr*n) for row major layout)A,B), corresponding to the eigenpairs specified byhowmnyandselect. The eigenvectors must be stored in consecutive columns ofvr, as returned by?tgevc.If,job='V'vris not referenced.
- lda
- The leading dimension ofa; at least max(1,n).
- ldb
- The leading dimension ofb; at least max(1,n).
- ldvl
- The leading dimension ofvl;.ldvl≥1Iforjob='E''B', thenldvl≥max(1,n)for column major layout and.ldvl≥max(1,m) for row major layout
- ldvr
- The leading dimension ofvr;.ldvr≥1Iforjob='E''B', thenldvr≥max(1,n)for column major layout and.ldvr≥max(1,m) for row major layout
- mm
- The number of elements in the arrayssanddif().mm≥m
Output Parameters
- s
- Array,size.mmIforjob='E''B', contains the reciprocal condition numbers of the selected eigenvalues, stored in consecutive elements of the array.If,job='V'sis not referenced.For real flavors:For a complex conjugate pair of eigenvalues two consecutive elements ofsare set to the same value. Thus,s[,j- 1]dif[, and thej- 1]j-th columns ofvlandvrall correspond to the same eigenpair (but not in general thej-th eigenpair, unless all eigenpairs are selected).
- dif
- Array,size.mmIforjob='V''B', contains the estimated reciprocal condition numbers of the selected eigenvectors, stored in consecutive elements of the array.If the eigenvalues cannot be reordered to computedif[,j]dif[is set to 0; this can only occur when the true value would be very small anyway.j]If,job='E'difis not referenced.For real flavors:For a complex eigenvector, two consecutive elements ofdifare set to the same value.For complex flavors:For each eigenvalue/vector specified byselect,difstores a Frobenius norm-based estimate of Difl.
- m
- The number of elements in the arrayssanddifused to store the specified condition numbers; for each selected eigenvalue one element is used.If,howmny='A'mis set ton.
Return Values
This function returns a value
info
.If , the execution is successful.
info
=0If , the
info
= -i
i
-th parameter had an illegal value.