?tgsja
?tgsja
Computes the generalized SVD of two upper triangular or trapezoidal matrices.
Syntax
lapack_int LAPACKE_stgsja
(
int
matrix_layout
,
char
jobu
,
char
jobv
,
char
jobq
,
lapack_int
m
,
lapack_int
p
,
lapack_int
n
,
lapack_int
k
,
lapack_int
l
,
float*
a
,
lapack_int
lda
,
float*
b
,
lapack_int
ldb
,
float
tola
,
float
tolb
,
float*
alpha
,
float*
beta
,
float*
u
,
lapack_int
ldu
,
float*
v
,
lapack_int
ldv
,
float*
q
,
lapack_int
ldq
,
lapack_int*
ncycle
);
lapack_int LAPACKE_dtgsja
(
int
matrix_layout
,
char
jobu
,
char
jobv
,
char
jobq
,
lapack_int
m
,
lapack_int
p
,
lapack_int
n
,
lapack_int
k
,
lapack_int
l
,
double*
a
,
lapack_int
lda
,
double*
b
,
lapack_int
ldb
,
double
tola
,
double
tolb
,
double*
alpha
,
double*
beta
,
double*
u
,
lapack_int
ldu
,
double*
v
,
lapack_int
ldv
,
double*
q
,
lapack_int
ldq
,
lapack_int*
ncycle
);
lapack_int LAPACKE_ctgsja
(
int
matrix_layout
,
char
jobu
,
char
jobv
,
char
jobq
,
lapack_int
m
,
lapack_int
p
,
lapack_int
n
,
lapack_int
k
,
lapack_int
l
,
lapack_complex_float*
a
,
lapack_int
lda
,
lapack_complex_float*
b
,
lapack_int
ldb
,
float
tola
,
float
tolb
,
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*
ncycle
);
lapack_int LAPACKE_ztgsja
(
int
matrix_layout
,
char
jobu
,
char
jobv
,
char
jobq
,
lapack_int
m
,
lapack_int
p
,
lapack_int
n
,
lapack_int
k
,
lapack_int
l
,
lapack_complex_double*
a
,
lapack_int
lda
,
lapack_complex_double*
b
,
lapack_int
ldb
,
double
tola
,
double
tolb
,
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*
ncycle
);
Include Files
- mkl.h
Description
The routine computes the generalized singular value decomposition (GSVD) of two real/complex upper triangular (or trapezoidal) matrices
A
and B
. On entry, it is assumed that matrices A
and B
have the following forms, which may be obtained by the preprocessing subroutine ggsvp from a general m
-by-n
matrix A
and p
-by-n
matrix B
: 


where the , otherwise
k
-by-k
matrix A
12
and l
-by-l
matrix B
13
are nonsingular upper triangular; A
23
is l
-by-l
upper triangular if m
-k
-l
≥
0A
23
is (m
-k
)-by-l
upper trapezoidal. On exit,
U
H
A
*Q
= D
1
*(0 R
)V
H
B
*Q
= D
2
*(0 R
)where
U
, V
and Q
are orthogonal/unitary matrices, R
is a nonsingular upper triangular matrix, and D
1
and D
2
are "diagonal" matrices, which are of the following structures: 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
= IR
is stored in a
(1:k
+l
, n
-k
-l
+1:n
) on exit.If ,
m
-k
-l
< 0


where
C
= diag(alpha
[k
],...,alpha
[m
-1]S
= diag(beta
[k
],...,beta
[m
-1]C
2
+ S
2
= IOn exit,
is stored in

a
(1:m
, n
-k
-l
+1:n
) and R
33
is storedin
b
(m
-k
+1:l
, n
+m
-k
-l
+1:n
).The computation of the orthogonal/unitary transformation matrices
U
, V
or Q
is optional. These matrices may either be formed explicitly, or they may
be postmultiplied into input matrices U
1
, V
1
, or Q
1
.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','I', or'N'.If,jobu='U'umust contain an orthogonal/unitary matrixU1on entry.If,jobu='I'uis initialized to the unit matrix.If,jobu='N'uis not computed.
- jobv
- Must be'V','I', or'N'.If,jobv='V'vmust contain an orthogonal/unitary matrixV1on entry.If,jobv='I'vis initialized to the unit matrix.If,jobv='N'vis not computed.
- jobq
- Must be'Q','I', or'N'.If,jobq='Q'qmust contain an orthogonal/unitary matrixQ1on entry.If,jobq='I'qis initialized to the unit matrix.If,jobq='N'qis not computed.
- m
- The number of rows of the matrixA(m≥0).
- p
- The number of rows of the matrixB(p≥0).
- n
- The number of columns of the matricesAandB(n≥0).
- k,l
- Specify the subblocks in the input matricesAandB, whose GSVD is computed.
- a,b,u,v,q
- 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.If,jobu='U'u(size max(1,must contain a matrixldu*m))U1(usually the orthogonal/unitary matrix returned by?ggsvp).If,jobv='V'v(size at least max(1,must contain a matrixldv*p))V1(usually the orthogonal/unitary matrix returned by?ggsvp).If,jobq='Q'q(size at least max(1,must contain a matrixldq*n))Q1(usually the orthogonal/unitary matrix returned by?ggsvp).
- 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.ifldu≥max(1,m);jobu='U'otherwise.ldu≥1
- ldv
- The leading dimension of the arrayv.ifldv≥max(1,p);jobv='V'otherwise.ldv≥1
- ldq
- The leading dimension of the arrayq.ifldq≥max(1,n);jobq='Q'otherwise.ldq≥1
- tola,tolb
- tolaandtolbare the convergence criteria for the Jacobi-Kogbetliantz iteration procedure. Generally, they are the same as used in?ggsvp:,tola= max(m,n)*|A|*MACHEPS.tolb= max(p,n)*|B|*MACHEPS
Output Parameters
- a
- On exit,a(n-k+1:n, 1:min(k+l,m)) contains the triangular matrixRor part ofR.
- b
- On exit, if necessary,b(m-k+1:l,n+m-k-l+1:n)) contains a part ofR.
- alpha,beta
- Arrays, size at least max(1,n). 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) = diag(C),beta(k+1:k+l) = diag(S)or if,m-k-l< 0,alpha(k+1:m)= diag(C)alpha(m+1:k+l)=0beta(k+1:m) = diag(