?spgst
?spgst
Reduces a real symmetric-definite generalized eigenvalue problem to the standard form using packed storage.
Syntax
lapack_int
LAPACKE_sspgst
(
int
matrix_layout
,
lapack_int
itype
,
char
uplo
,
lapack_int
n
,
float
*
ap
,
const
float
*
bp
);
lapack_int
LAPACKE_dspgst
(
int
matrix_layout
,
lapack_int
itype
,
char
uplo
,
lapack_int
n
,
double
*
ap
,
const
double
*
bp
);
Include Files
- mkl.h
Description
The routine reduces real symmetric-definite generalized eigenproblems
A
*x
= λ
*B
*x
A
*B
*x
= λ
*x
B
*A
*x
= λ
*x
to the standard form , using packed matrix storage. Here or .
C
*y
= λ
*y
A
is a real symmetric matrix, and B
is a real symmetric positive-definite matrix. Before calling this routine, call ?pptrf
to compute the Cholesky factorization: B
= U
T
*U
B
= L*L
T
Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- itype
- Must be 1 or 2 or 3.If, the generalized eigenproblem isitype= 1A*z=lambda*B*zfor:uplo='U',C= inv(U)*TA*inv(U);z= inv(U)*yfor:uplo='L',C= inv(L)*A*inv(L)T.z= inv(L)*TyIf, the generalized eigenproblem isitype= 2A*B*z=lambda*zfor:uplo='U',C=U*A*UT;z= inv(U)*yfor:uplo='L',C=L*TA*L.z= inv(L)*TyIf, the generalized eigenproblem isitype= 3B*A*z=lambda*zfor:uplo='U',C=U*A*UT;z=U*Tyfor:uplo='L',C=L*TA*L.z=L*y
- uplo
- Must be'U'or'L'.If,uplo='U'apstores the packed upper triangle ofA;you must supplyBin the factored form.B=UT*UIf,uplo='L'apstores the packed lower triangle ofA;you must supplyBin the factored form.B=L*LT
- n
- The order of the matricesAandB().n≥0
- ap,bp
- Arrays:apcontains the packed upper or lower triangle ofA.The dimension ofapmust be at least max(1,n*(n+1)/2).bpcontains the packed Cholesky factor ofB(as returned by?pptrfwith the sameuplovalue).The dimension ofbpmust be at least max(1,n*(n+1)/2).
Output Parameters
- ap
- The upper or lower triangle ofAis overwritten by the upper or lower triangle ofC, as specified by the argumentsitypeanduplo.
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.Application Notes
Forming the reduced matrix ) or or 3). When the routine is used as a step in the computation of eigenvalues and eigenvectors of the original problem, there may be a significant loss of accuracy if
C
is a stable procedure. However, it involves implicit multiplication by inv(
(if B
)itype
= 1B
(if itype
= 2B
is ill-conditioned with respect to inversion.The approximate number of floating-point operations is
n
3
.