NAG CL Interfacef08wwc (zggbak)

Settings help

CL Name Style:

1Purpose

f08wwc forms the right or left eigenvectors of the real generalized eigenvalue problem $Ax=\lambda Bx$, by backward transformation on the computed eigenvectors given by f08yxc. It is necessary to call this function only if the optional balancing function f08wvc was previously called to balance the matrix pair $\left(A,B\right)$.

2Specification

 #include
 void f08wwc (Nag_OrderType order, Nag_JobType job, Nag_SideType side, Integer n, Integer ilo, Integer ihi, const double lscale[], const double rscale[], Integer m, Complex v[], Integer pdv, NagError *fail)
The function may be called by the names: f08wwc, nag_lapackeig_zggbak or nag_zggbak.

3Description

If the matrix pair has been previously balanced using the function f08wvc then f08wwc backtransforms the eigenvector solution given by f08yxc. This is usually the sixth and last step in the solution of the generalized eigenvalue problem.
For a description of balancing, see the document for f08wvc.

4References

Ward R C (1981) Balancing the generalized eigenvalue problem SIAM J. Sci. Stat. Comp. 2 141–152

5Arguments

1: $\mathbf{order}$Nag_OrderType Input
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 ${\mathbf{order}}=\mathrm{Nag_RowMajor}$. See Section 3.1.3 in the Introduction to the NAG Library CL Interface for a more detailed explanation of the use of this argument.
Constraint: ${\mathbf{order}}=\mathrm{Nag_RowMajor}$ or $\mathrm{Nag_ColMajor}$.
2: $\mathbf{job}$Nag_JobType Input
On entry: specifies the backtransformation step required.
${\mathbf{job}}=\mathrm{Nag_DoNothing}$
No transformations are done.
${\mathbf{job}}=\mathrm{Nag_Permute}$
Only do backward transformations based on permutations.
${\mathbf{job}}=\mathrm{Nag_Scale}$
Only do backward transformations based on scaling.
${\mathbf{job}}=\mathrm{Nag_DoBoth}$
Do backward transformations for both permutations and scaling.
Note:  this must be identical to the argument job as supplied to f08wvc.
Constraint: ${\mathbf{job}}=\mathrm{Nag_DoNothing}$, $\mathrm{Nag_Permute}$, $\mathrm{Nag_Scale}$ or $\mathrm{Nag_DoBoth}$.
3: $\mathbf{side}$Nag_SideType Input
On entry: indicates whether left or right eigenvectors are to be transformed.
${\mathbf{side}}=\mathrm{Nag_LeftSide}$
The left eigenvectors are transformed.
${\mathbf{side}}=\mathrm{Nag_RightSide}$
The right eigenvectors are transformed.
Constraint: ${\mathbf{side}}=\mathrm{Nag_LeftSide}$ or $\mathrm{Nag_RightSide}$.
4: $\mathbf{n}$Integer Input
On entry: $n$, the order of the matrices $A$ and $B$ of the generalized eigenvalue problem.
Constraint: ${\mathbf{n}}\ge 0$.
5: $\mathbf{ilo}$Integer Input
6: $\mathbf{ihi}$Integer Input
On entry: ${i}_{\mathrm{lo}}$ and ${i}_{\mathrm{hi}}$ as determined by a previous call to f08wvc.
Constraints:
• if ${\mathbf{n}}>0$, $1\le {\mathbf{ilo}}\le {\mathbf{ihi}}\le {\mathbf{n}}$;
• if ${\mathbf{n}}=0$, ${\mathbf{ilo}}=1$ and ${\mathbf{ihi}}=0$.
7: $\mathbf{lscale}\left[\mathit{dim}\right]$const double Input
Note: the dimension, dim, of the array lscale must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
On entry: details of the permutations and scaling factors applied to the left side of the matrices $A$ and $B$, as returned by a previous call to f08wvc.
8: $\mathbf{rscale}\left[\mathit{dim}\right]$const double Input
Note: the dimension, dim, of the array rscale must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
On entry: details of the permutations and scaling factors applied to the right side of the matrices $A$ and $B$, as returned by a previous call to f08wvc.
9: $\mathbf{m}$Integer Input
On entry: $m$, the required number of left or right eigenvectors.
Constraint: $0\le {\mathbf{m}}\le {\mathbf{n}}$.
10: $\mathbf{v}\left[\mathit{dim}\right]$Complex Input/Output
Note: the dimension, dim, of the array v must be at least
• $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{pdv}}×{\mathbf{m}}\right)$ when ${\mathbf{order}}=\mathrm{Nag_ColMajor}$;
• $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}×{\mathbf{pdv}}\right)$ when ${\mathbf{order}}=\mathrm{Nag_RowMajor}$.
The $\left(i,j\right)$th element of the matrix $V$ is stored in
• ${\mathbf{v}}\left[\left(j-1\right)×{\mathbf{pdv}}+i-1\right]$ when ${\mathbf{order}}=\mathrm{Nag_ColMajor}$;
• ${\mathbf{v}}\left[\left(i-1\right)×{\mathbf{pdv}}+j-1\right]$ when ${\mathbf{order}}=\mathrm{Nag_RowMajor}$.
On entry: the matrix of right or left eigenvectors, as returned by f08wvc.
On exit: the transformed right or left eigenvectors.
11: $\mathbf{pdv}$Integer Input
On entry: the stride separating row or column elements (depending on the value of order) in the array v.
Constraints:
• if ${\mathbf{order}}=\mathrm{Nag_ColMajor}$, ${\mathbf{pdv}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$;
• if ${\mathbf{order}}=\mathrm{Nag_RowMajor}$, ${\mathbf{pdv}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.
12: $\mathbf{fail}$NagError * Input/Output
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).

6Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument $⟨\mathit{\text{value}}⟩$ had an illegal value.
NE_INT
On entry, ${\mathbf{n}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{n}}\ge 0$.
On entry, ${\mathbf{pdv}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{pdv}}>0$.
NE_INT_2
On entry, ${\mathbf{m}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{n}}=⟨\mathit{\text{value}}⟩$.
Constraint: $0\le {\mathbf{m}}\le {\mathbf{n}}$.
On entry, ${\mathbf{pdv}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{m}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{pdv}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.
On entry, ${\mathbf{pdv}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{n}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{pdv}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
NE_INT_3
On entry, ${\mathbf{n}}=⟨\mathit{\text{value}}⟩$, ${\mathbf{ilo}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{ihi}}=⟨\mathit{\text{value}}⟩$.
Constraint: if ${\mathbf{n}}>0$, $1\le {\mathbf{ilo}}\le {\mathbf{ihi}}\le {\mathbf{n}}$;
if ${\mathbf{n}}=0$, ${\mathbf{ilo}}=1$ and ${\mathbf{ihi}}=0$.
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.
See Section 7.5 in the Introduction to the NAG Library CL Interface for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library CL Interface for further information.

7Accuracy

The errors are negligible.

8Parallelism and Performance

f08wwc 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 X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

The number of operations is proportional to ${n}^{2}$.
The real analogue of this function is f08wjc.

10Example

See Section 10 in f08xsc and f08yxc.