?ggsvd3
?ggsvd3
Computes generalized SVD.
Syntax
lapack_int
LAPACKE_sggsvd3
(
int
matrix_layout
,
char
jobu
,
char
jobv
,
char
jobq
,
lapack_int
m
,
lapack_int
n
,
lapack_int
p
,
lapack_int
*
k
,
lapack_int
*
l
,
float
*
a
,
lapack_int
lda
,
float
*
b
,
lapack_int
ldb
,
float
*
alpha
,
float
*
beta
,
float
*
u
,
lapack_int
ldu
,
float
*
v
,
lapack_int
ldv
,
float
*
q
,
lapack_int
ldq
,
lapack_int
*
iwork
);
lapack_int
LAPACKE_dggsvd3
(
int
matrix_layout
,
char
jobu
,
char
jobv
,
char
jobq
,
lapack_int
m
,
lapack_int
n
,
lapack_int
p
,
lapack_int
*
k
,
lapack_int
*
l
,
double
*
a
,
lapack_int
lda
,
double
*
b
,
lapack_int
ldb
,
double
*
alpha
,
double
*
beta
,
double
*
u
,
lapack_int
ldu
,
double
*
v
,
lapack_int
ldv
,
double
*
q
,
lapack_int
ldq
,
lapack_int
*
iwork
);
lapack_int
LAPACKE_cggsvd3
(
int
matrix_layout
,
char
jobu
,
char
jobv
,
char
jobq
,
lapack_int
m
,
lapack_int
n
,
lapack_int
p
,
lapack_int
*
k
,
lapack_int
*
l
,
lapack_complex_float
*
a
,
lapack_int
lda
,
lapack_complex_float
*
b
,
lapack_int
ldb
,
float
*
alpha
,
float
*
beta
,
lapack_complex_float
*
u
,
lapack_int
ldu
,
lapack_complex_float
*
v
,
lapack_int
ldv
,
lapack_complex_float
*
q
,
lapack_int
ldq
,
lapack_int
*
iwork
);
lapack_int
LAPACKE_zggsvd3
(
int
matrix_layout
,
char
jobu
,
char
jobv
,
char
jobq
,
lapack_int
m
,
lapack_int
n
,
lapack_int
p
,
lapack_int
*
k
,
lapack_int
*
l
,
lapack_complex_double
*
a
,
lapack_int
lda
,
lapack_complex_double
*
b
,
lapack_int
ldb
,
double
*
alpha
,
double
*
beta
,
lapack_complex_double
*
u
,
lapack_int
ldu
,
lapack_complex_double
*
v
,
lapack_int
ldv
,
lapack_complex_double
*
q
,
lapack_int
ldq
,
lapack_int
*
iwork
);
Include Files
- mkl.h
Description
?ggsvd3
computes the generalized singular value decomposition (GSVD) of an m
-by-n
real or complex matrix A
and p
-by-n
real or complex matrix B
:U
T
*A
*Q
= D
1
*( 0 R
), V
T
*B
*Q
= D
2
*( 0 R
) for real flavorsor
U
H
*A
*Q
= D
1
*( 0 R
), V
H
*B
*Q
= D
2
*( 0 R
) for complex flavorswhere
U
, V
and Q
are orthogonal/unitary matrices.Let
k
+l
= the effective numerical rank of the matrix (A
T
BT
)T
for real flavors or the matrix (A
H
,B
H
)H
for complex flavors, then R
is a (k
+ l
)-by-(k
+ l
) nonsingular upper triangular matrix, D
1
and D
2
are m
-by-(k
+ l
) and p
-by-(k
+ l
) "diagonal" matrices and of the following structures, respectively:If
m
-k
-l
≥
0,


where
C
= diag( alpha
(k
+1), ... , alpha
(k
+l
) ),S
= diag( beta
(k
+1), ... , beta
(k
+l
) ),C
2
+ S
2
= I
.If
m
- k
- l
< 0,


where
C
= diag(alpha
(k
+ 1), ... , alpha
(m
)),S
= diag(beta
(k
+ 1), ... , beta
(m
)), C
2
+ S
2
= I
.The routine computes
C
, S
, R
, and optionally the orthogonal/unitary transformation matrices U
, V
and Q
. In particular, if
B
is an n
-by-n
nonsingular matrix, then the GSVD of A
and B
implicitly gives the SVD of A
*inv(B
): A
*inv(B
) = U
*(D
1
*inv(D
2
))*V
T
for real flavors or
A
*inv(B
) = U
*(D
1
*inv(D
2
))*V
H
for complex flavors. If (
A
T
,B
T
)T
for real flavors or (A
H
,B
H
)H
for complex flavors has orthonormal columns, then the GSVD of A
and B
is also equal to the CS decomposition of A
and B
. Furthermore, the GSVD can be used to derive the solution of the eigenvalue problem: A
T
*A
X
= λ
* B
T
*B
X
for real flavors or
A
H
*A
X
= λ
* B
H
*B
X
for complex flavors In some literature, the GSVD of
A
and B
is presented in the formU
T
*A
*X
= ( 0 D
1
), V
T
*B
*X
= ( 0 D
2
) for real (A
, B
) or
U
H
*A
*X
= ( 0 D
1
), V
H
*B
*X
= ( 0 D
2
) for complex (A
, B
) where
U
and V
are orthogonal and X
is nonsingular, D
1
and D
2
are "diagonal''. The former GSVD form can be converted to the latter form by taking the nonsingular matrix X
as
Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- jobu
- = 'U': Orthogonal/unitary matrixUis computed;= 'N':Uis not computed.
- jobv
- = 'V': Orthogonal/unitary matrixVis computed;= 'N':Vis not computed.
- jobq
- = 'Q': Orthogonal/unitary matrixQis computed;= 'N':Qis not computed.
- m
- The number of rows of the matrixA.m≥0.
- n
- The number of columns of the matricesAandB.n≥0.
- p
- The number of rows of the matrixB.p≥0.
- a
- Array, size(.lda*n)On entry, them-by-nmatrixA.
- lda
- The leading dimension of the arraya.lda≥max(1,m).
- b
- Array, size(.ldb*n)On entry, thep-by-nmatrixB.
- ldb
- The leading dimension of the arrayb.ldb≥max(1,p).
- ldu
- The leading dimension of the arrayu.ldu≥max(1,m) ifjobu= 'U';ldu≥1 otherwise.
- ldv
- The leading dimension of the arrayv.ldv≥max(1,p) ifjobv= 'V';ldv≥1 otherwise.
- ldq
- The leading dimension of the arrayq.ldq≥max(1,n) ifjobq= 'Q';ldq≥1 otherwise.
- iwork
- Array, size (n).
Output Parameters
- k,l
- On exit,kandlspecify the dimension of the subblocks described in the Description section.k+l= effective numerical rank of (AT,BT)Tfor real flavors or (AH,BH)Hfor complex flavors.
- a
- On exit,acontains the triangular matrixR, or part ofR.Ifm-k-l≥0,Ris stored inthe elements of array.acorresponding toA1:k+l,n-k-l+ 1:nIfm-k-l< 0,the elements of array, andacorresponding toA(1:m,n-k-l+ 1:nR33is stored inbthe elements of arrayon exit.acorresponding toAm-k+ 1:l,n+m-k-l+ 1:n
- b
- On exit,bcontains part of the triangular matrixRifm-k-l< 0.See Description for details.
- alpha
- Array, size (n)
- beta
- Array, size (n)On exit,alphaandbetacontain the generalized singular value pairs ofaandb;alpha[0:= 1,k- 1]beta[0:= 0,k- 1]and ifm-k-l≥0,alpha[=k:k+l- 1]C,beta[=k:k+l- 1]S,or ifm-k-l< 0,