?ggsvd
?ggsvd
Computes the generalized singular value decomposition of a pair of general rectangular matrices (deprecated).
Syntax
lapack_int LAPACKE_sggsvd
(
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_dggsvd
(
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_cggsvd
(
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_zggsvd
(
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
This routine is deprecated; use
ggsvd3
.The routine computes the generalized singular value decomposition (GSVD) of an
m
-by-n
real/complex matrix A
and p
-by-n
real/complex matrix B
:U'
*A
*Q
= D
1
*(0 R
)V'
*B
*Q
= D
2
*(0 R
)where
U
, V
and Q
are orthogonal/unitary matrices and U'
, V'
mean transpose/conjugate transpose of U
and V
respectively.Let
k
+l
= the effective numerical rank of the matrix (A'
, B'
)', 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
],..., alpha
[k
+ l
- 1]S
= diag(beta
[k
],...,beta
[k
+ l
- 1]C
2
+ S
2
= INonzero element (1 for column major layout and in for row major layout.
r
i j
≤
i
≤
j
≤
k
+ l
) of R
is stored in a
[(i
- 1) + (n
- k
- l
+ j
- 1)*lda
]a
[(i
- 1)*lda
+ (n
- k
- l
+ j
- 1)]If ,
m
-k
-l
< 0


where
C
= diag(alpha
[k
],..., alpha
(m
)S
= diag(beta
[k
],...,beta
[m
- 1]C
2
+ S
2
= IOn exit, the location of nonzero element (1
r
i j
≤
i
≤
j
≤
k
+ l
) of R
depends on the value of i
. For i
≤
m
this element is stored in a
[(
for column major layout and in i
- 1) + (n
- k
- l
+ j
- 1)*lda
]a
[(
for row major layout. For i
- 1)*lda
+ (n
- k
- l
+ j
- 1)]m
< i
≤
k
+ l
it is stored in b
[(
for column major layout and in i
- k
- 1) + (n
- k
- l
+ j
- 1)*ldb
]b
[(
for row major layout.i
- k
- 1)*ldb
+ (n
- k
- l
+ j
- 1)]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
*B
-1
:A
*B
-1
= U
*(D
1
*D
2
-1
)*V'
If (
A
', B
')' 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'
**A
*x
= λ
*B'
*B
*x
Input Parameters
- matrix_layout
- Specifies whether matrix storage layout is row major (LAPACK_ROW_MAJOR) or column major (LAPACK_COL_MAJOR).
- jobu
- Must be'U'or'N'.If, orthogonal/unitary matrixjobu='U'Uis computed.If,jobu='N'Uis not computed.
- jobv
- Must be'V'or'N'.If, orthogonal/unitary matrixjobv='V'Vis computed.If,jobv='N'Vis not computed.
- jobq
- Must be'Q'or'N'.If, orthogonal/unitary matrixjobq='Q'Qis computed.If,jobq='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,b
- Arrays:a(size at least max(1,contains thelda*n) for column major layout and max(1,lda*m) for row major layout)m-by-nmatrixA.b(size at least max(1,contains theldb*n) for column major layout and max(1,ldb*p) for row major layout)p-by-nmatrixB.
- lda
- The leading dimension ofa; at least max(1,m)for column major layout and max(1,.n) for row major layout
- ldb
- The leading dimension ofb; at least max(1,p)for column major layout and max(1,.n) for row major layout
- ldu
- The leading dimension of the arrayu.(1,ldu≥maxm) if;jobu='U'otherwise.ldu≥1
- ldv
- The leading dimension of the arrayv.(1,ldv≥maxp) if;jobv='V'otherwise.ldv≥1
- ldq
- The leading dimension of the arrayq.(1,ldq≥maxn) if;jobq='Q'otherwise.ldq≥1
Output Parameters
- k,l
- On exit,kandlspecify the dimension of the subblocks. The sumk+lis equal to the effective numerical rank of (A',B')'.
- a
- On exit,acontains the triangular matrixRor part ofR.
- b
- On exit,bcontains part of the triangular matrix R if.m-k-l< 0
- alpha,beta
- Arrays, size at least max(1,n) each.Contain the generalized singular value pairs ofAandB:,alpha(1:k) = 1,beta(1:k) = 0and if,m-k-l≥0,alpha(k+1:k+l) =C,beta(k+1:k+l) =Sor if,m-k-l< 0,alpha(k+1:m)=Calpha(m+1: