nag_ztgsyl (f08yvc) (PDF version)
f08 Chapter Contents
f08 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_ztgsyl (f08yvc)

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

nag_ztgsyl (f08yvc) solves the generalized complex triangular Sylvester equations.

2  Specification

#include <nag.h>
#include <nagf08.h>
void  nag_ztgsyl (Nag_OrderType order, Nag_TransType trans, Integer ijob, Integer m, Integer n, const Complex a[], Integer pda, const Complex b[], Integer pdb, Complex c[], Integer pdc, const Complex d[], Integer pdd, const Complex e[], Integer pde, Complex f[], Integer pdf, double *scale, double *dif, NagError *fail)

3  Description

nag_ztgsyl (f08yvc) solves either the generalized complex Sylvester equations
AR-LB =αC DR-LE =αF, (1)
or the equations
AHR+DHL =αC RBH+LEH =-αF, (2)
where the pair A,D are given m by m matrices in generalized Schur form, B,E are given n by n matrices in generalized Schur form and C,F are given m by n matrices. The pair R,L are the m by n solution matrices, and α is an output scaling factor determined by the function to avoid overflow in computing R,L.
Equations (1) are equivalent to equations of the form
Zx=αb ,
where
Z = IA-BHI ID-EHI
and  is the Kronecker product. Equations (2) are then equivalent to
ZHy = αb .
The pair S,T are in generalized Schur form if S and T are upper triangular as returned, for example, by nag_zgges (f08xnc), or nag_zhgeqz (f08xsc) with job=Nag_Schur.
Optionally, the function estimates DifA,D,B,E, the separation between the matrix pairs A,D and B,E, which is the smallest singular value of Z. The estimate can be based on either the Frobenius norm, or the 1-norm. The 1-norm estimate can be three to ten times more expensive than the Frobenius norm estimate, but makes the condition estimation uniform with the nonsymmetric eigenproblem. The Frobenius norm estimate provides a low cost, but equally reliable estimate. For more information see Sections 2.4.8.3 and 4.11.1.3 of Anderson et al. (1999) and Kågström and Poromaa (1996).

4  References

Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999) LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia http://www.netlib.org/lapack/lug
Kågström B (1994) A perturbation analysis of the generalized Sylvester equation AR-LB,DR-LE=c,F SIAM J. Matrix Anal. Appl. 15 1045–1060
Kågström B and Poromaa P (1996) LAPACK-style algorithms and software for solving the generalized Sylvester equation and estimating the separation between regular matrix pairs ACM Trans. Math. Software 22 78–103

5  Arguments

1:     orderNag_OrderTypeInput
On entry: the order argument specifies the two-dimensional storage scheme being used, i.e., row-major ordering or column-major ordering. C language defined storage is specified by order=Nag_RowMajor. See Section 3.2.1.3 in the Essential Introduction for a more detailed explanation of the use of this argument.
Constraint: order=Nag_RowMajor or Nag_ColMajor.
2:     transNag_TransTypeInput
On entry: if trans=Nag_NoTrans, solve the generalized Sylvester equation (1).
If trans=Nag_ConjTrans, solve the ‘conjugate transposed’ system (2).
Constraint: trans=Nag_NoTrans or Nag_ConjTrans.
3:     ijobIntegerInput
On entry: specifies what kind of functionality is to be performed when trans=Nag_NoTrans.
ijob=0
Solve (1) only.
ijob=1
The functionality of ijob=0 and 3.
ijob=2
The functionality of ijob=0 and 4.
ijob=3
Only an estimate of Dif A,D,B,E  is computed based on the Frobenius norm.
ijob=4
Only an estimate of Dif A,D,B,E  is computed based on the 1-norm.
If trans=Nag_ConjTrans, ijob is not referenced.
Constraint: if trans=Nag_NoTrans, 0ijob4.
4:     mIntegerInput
On entry: m, the order of the matrices A and D, and the row dimension of the matrices C, F, R and L.
Constraint: m0.
5:     nIntegerInput
On entry: n, the order of the matrices B and E, and the column dimension of the matrices C, F, R and L.
Constraint: n0.
6:     a[dim]const ComplexInput
Note: the dimension, dim, of the array a must be at least max1,pda×m.
The i,jth element of the matrix A is stored in
  • a[j-1×pda+i-1] when order=Nag_ColMajor;
  • a[i-1×pda+j-1] when order=Nag_RowMajor.
On entry: the upper triangular matrix A.
7:     pdaIntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array a.
Constraint: pdamax1,m.
8:     b[dim]const ComplexInput
Note: the dimension, dim, of the array b must be at least max1,pdb×n.
The i,jth element of the matrix B is stored in
  • b[j-1×pdb+i-1] when order=Nag_ColMajor;
  • b[i-1×pdb+j-1] when order=Nag_RowMajor.
On entry: the upper triangular matrix B.
9:     pdbIntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array b.
Constraint: pdbmax1,n.
10:   c[dim]ComplexInput/Output
Note: the dimension, dim, of the array c must be at least
  • max1,pdc×n when order=Nag_ColMajor;
  • max1,m×pdc when order=Nag_RowMajor.
The i,jth element of the matrix C is stored in
  • c[j-1×pdc+i-1] when order=Nag_ColMajor;
  • c[i-1×pdc+j-1] when order=Nag_RowMajor.
On entry: contains the right-hand-side matrix C.
On exit: if ijob=0, 1 or 2, c is overwritten by the solution matrix R.
If trans=Nag_NoTrans and ijob=3 or 4, c holds R, the solution achieved during the computation of the Dif estimate.
11:   pdcIntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array c.
Constraints:
  • if order=Nag_ColMajor, pdcmax1,m;
  • if order=Nag_RowMajor, pdcmax1,n.
12:   d[dim]const ComplexInput
Note: the dimension, dim, of the array d must be at least max1,pdd×m.
The i,jth element of the matrix D is stored in
  • d[j-1×pdd+i-1] when order=Nag_ColMajor;
  • d[i-1×pdd+j-1] when order=Nag_RowMajor.
On entry: the upper triangular matrix D.
13:   pddIntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array d.
Constraint: pddmax1,m.
14:   e[dim]const ComplexInput
Note: the dimension, dim, of the array e must be at least max1,pde×n.
The i,jth element of the matrix E is stored in
  • e[j-1×pde+i-1] when order=Nag_ColMajor;
  • e[i-1×pde+j-1] when order=Nag_RowMajor.
On entry: the upper triangular matrix E.
15:   pdeIntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array e.
Constraint: pdemax1,n.
16:   f[dim]ComplexInput/Output
Note: the dimension, dim, of the array f must be at least
  • max1,pdf×n when order=Nag_ColMajor;
  • max1,m×pdf when order=Nag_RowMajor.
The i,jth element of the matrix F is stored in
  • f[j-1×pdf+i-1] when order=Nag_ColMajor;
  • f[i-1×pdf+j-1] when order=Nag_RowMajor.
On entry: contains the right-hand side matrix F.
On exit: if ijob=0, 1 or 2, f is overwritten by the solution matrix L.
If trans=Nag_NoTrans and ijob=3 or 4, f holds L, the solution achieved during the computation of the Dif estimate.
17:   pdfIntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array f.
Constraints:
  • if order=Nag_ColMajor, pdfmax1,m;
  • if order=Nag_RowMajor, pdfmax1,n.
18:   scaledouble *Output
On exit: α, the scaling factor in (1) or (2).
If 0<scale<1, c and f hold the solutions R and L, respectively, to a slightly perturbed system but the input arrays abd and e have not been changed.
If scale=0, c and f hold the solutions R and L, respectively, to the homogeneous system with C=F=0. In this case dif is not referenced.
Normally, scale=1.
19:   difdouble *Output
On exit: the estimate of Dif. If ijob=0, dif is not referenced.
20:   failNagError *Input/Output
The NAG error argument (see Section 3.6 in the Essential Introduction).

6  Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_EIGENVALUES
A,D and B,E have common or close eigenvalues and so no solution could be computed.
NE_ENUM_INT
On entry, ijob=value and trans=value.
Constraint: if trans=Nag_NoTrans, 0ijob4.
NE_INT
On entry, m=value.
Constraint: m0.
On entry, n=value.
Constraint: n0.
On entry, pda=value.
Constraint: pda>0.
On entry, pdb=value.
Constraint: pdb>0.
On entry, pdc=value.
Constraint: pdc>0.
On entry, pdd=value.
Constraint: pdd>0.
On entry, pde=value.
Constraint: pde>0.
On entry, pdf=value.
Constraint: pdf>0.
NE_INT_2
On entry, pda=value and m=value.
Constraint: pdamax1,m.
On entry, pdb=value and n=value.
Constraint: pdbmax1,n.
On entry, pdc=value and m=value.
Constraint: pdcmax1,m.
On entry, pdc=value and n=value.
Constraint: pdcmax1,n.
On entry, pdd=value and m=value.
Constraint: pddmax1,m.
On entry, pde=value and n=value.
Constraint: pdemax1,n.
On entry, pdf=value and m=value.
Constraint: pdfmax1,m.
On entry, pdf=value and n=value.
Constraint: pdfmax1,n.
NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact NAG for assistance.

7  Accuracy

See Kågström (1994) for a perturbation analysis of the generalized Sylvester equation.

8  Parallelism and Performance

nag_ztgsyl (f08yvc) is not threaded by NAG in any implementation.
nag_ztgsyl (f08yvc) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the Users' Note for your implementation for any additional implementation-specific information.

9  Further Comments

The total number of floating-point operations needed to solve the generalized Sylvester equations is approximately 8mnn+m. The Frobenius norm estimate of Dif does not require additional significant computation, but the 1-norm estimate is typically five times more expensive.
The real analogue of this function is nag_dtgsyl (f08yhc).

10  Example

This example solves the generalized Sylvester equations
AR-LB =αC DR-LE =αF,
where
A = 4.0+4.0i 1.0+1.0i 1.0+1.0i 2.0-1.0i 0.0i+0.0 2.0+1.0i 1.0+1.0i 1.0+1.0i 0.0i+0.0 0.0i+0.0 2.0-1.0i 1.0+1.0i 0.0i+0.0 0.0i+0.0 0.0i+0.0 6.0-2.0i ,
B = 2.0 1.0+1.0i 1.0+1.0i 3.0-1.0i 0.0 1.0i+0.0 2.0+1.0i 1.0+1.0i 0.0 0.0i+0.0 1.0i+0.0 1.0+1.0i 0.0 0.0i+0.0 0.0i+0.0 2.0i+0.0 ,
D = 1.0+1.0i 1.0-1.0i 1.0+1.0i 1.0-1.0i 0.0i+0.0 6.0-4.0i 1.0-1.0i 1.0+1.0i 0.0i+0.0 0.0i+0.0 2.0+4.0i 1.0-1.0i 0.0i+0.0 0.0i+0.0 0.0i+0.0 2.0+3.0i ,
E = 1.0 1.0+1.0i 1.0-1.0i 1.0+1.0i 0.0 2.0i+0.0 1.0+1.0i 1.0-1.0i 0.0 0.0i+0.0 2.0i+0.0 1.0+1.0i 0.0 0.0i+0.0 0.0i+0.0 1.0i+0.0 ,
C = -13.0+9.0i 2.0+8.0i -2.0+8.0i -2.0+5.0i -9.0-1.0i 0.0+5.0i -7.0-3.0i -6.0-0.0i -1.0+1.0i 4.0+2.0i 4.0-5.0i 9.0-5.0i -6.0+6.0i 9.0+1.0i -2.0+4.0i 22.0-8.0i
and
F = -6.0+05.0i 4.0-4.0i -3.0+11.0i 3.0-07.0i -5.0+11.0i 12.0-4.0i -2.0+02.0i 0.0+14.0i -5.0-01.0i 0.0+4.0i -2.0+10.0i 3.0-01.0i -6.0-02.0i 1.0+1.0i -7.0-03.0i 4.0+07.0i .

10.1  Program Text

Program Text (f08yvce.c)

10.2  Program Data

Program Data (f08yvce.d)

10.3  Program Results

Program Results (f08yvce.r)


nag_ztgsyl (f08yvc) (PDF version)
f08 Chapter Contents
f08 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2014