nag_zstein (f08jxc) (PDF version)
f08 Chapter Contents
f08 Chapter Introduction
NAG Library Manual

NAG Library Function Document

nag_zstein (f08jxc)

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1  Purpose

nag_zstein (f08jxc) computes the eigenvectors of a real symmetric tridiagonal matrix corresponding to specified eigenvalues, by inverse iteration, storing the eigenvectors in a complex array.

2  Specification

#include <nag.h>
#include <nagf08.h>
void  nag_zstein (Nag_OrderType order, Integer n, const double d[], const double e[], Integer m, const double w[], const Integer iblock[], const Integer isplit[], Complex z[], Integer pdz, Integer ifailv[], NagError *fail)

3  Description

nag_zstein (f08jxc) computes the eigenvectors of a real symmetric tridiagonal matrix T corresponding to specified eigenvalues, by inverse iteration (see Jessup and Ipsen (1992)). It is designed to be used in particular after the specified eigenvalues have been computed by nag_dstebz (f08jjc) with rank=Nag_ByBlock, but may also be used when the eigenvalues have been computed by other functions in Chapters f02 or f08.
The eigenvectors of T are real, but are stored by this function in a complex array. If T has been formed by reduction of a full complex Hermitian matrix A to tridiagonal form, then eigenvectors of T may be transformed to (complex) eigenvectors of A by a call to nag_zunmtr (f08fuc) or nag_zupmtr (f08guc).
nag_dstebz (f08jjc) determines whether the matrix T splits into block diagonal form:
T = T1 T2 . . . Tp  
and passes details of the block structure to this function in the arrays iblock and isplit. This function can then take advantage of the block structure by performing inverse iteration on each block Ti separately, which is more efficient than using the whole matrix.

4  References

Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Jessup E and Ipsen I C F (1992) Improving the accuracy of inverse iteration SIAM J. Sci. Statist. Comput. 13 550–572

5  Arguments

1:     order Nag_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 2.3.1.3 in How to Use the NAG Library and its Documentation for a more detailed explanation of the use of this argument.
Constraint: order=Nag_RowMajor or Nag_ColMajor.
2:     n IntegerInput
On entry: n, the order of the matrix T.
Constraint: n0.
3:     d[dim] const doubleInput
Note: the dimension, dim, of the array d must be at least max1,n.
On entry: the diagonal elements of the tridiagonal matrix T.
4:     e[dim] const doubleInput
Note: the dimension, dim, of the array e must be at least max1,n-1.
On entry: the off-diagonal elements of the tridiagonal matrix T.
5:     m IntegerInput
On entry: m, the number of eigenvectors to be returned.
Constraint: 0mn.
6:     w[dim] const doubleInput
Note: the dimension, dim, of the array w must be at least max1,n.
On entry: the eigenvalues of the tridiagonal matrix T stored in w[0] to w[m-1], as returned by nag_dstebz (f08jjc) with rank=Nag_ByBlock. Eigenvalues associated with the first sub-matrix must be supplied first, in nondecreasing order; then those associated with the second sub-matrix, again in nondecreasing order; and so on.
Constraint: if iblock[i]=iblock[i+1], w[i]w[i+1], for i=0,1,,m-2.
7:     iblock[dim] const IntegerInput
Note: the dimension, dim, of the array iblock must be at least max1,n.
On entry: the first m elements must contain the sub-matrix indices associated with the specified eigenvalues, as returned by nag_dstebz (f08jjc) with rank=Nag_ByBlock. If the eigenvalues were not computed by nag_dstebz (f08jjc) with rank=Nag_ByBlock, set iblock[i-1] to 1, for i=1,2,,m.
Constraint: iblock[i]iblock[i+1], for i=0,1,,m-2.
8:     isplit[dim] const IntegerInput
Note: the dimension, dim, of the array isplit must be at least max1,n.
On entry: the points at which T breaks up into sub-matrices, as returned by nag_dstebz (f08jjc) with rank=Nag_ByBlock. If the eigenvalues were not computed by nag_dstebz (f08jjc) with rank=Nag_ByBlock, set isplit[0] to n.
9:     z[dim] ComplexOutput
Note: the dimension, dim, of the array z must be at least
  • max1,pdz×m when order=Nag_ColMajor;
  • max1,n×pdz when order=Nag_RowMajor.
The i,jth element of the matrix Z is stored in
  • z[j-1×pdz+i-1] when order=Nag_ColMajor;
  • z[i-1×pdz+j-1] when order=Nag_RowMajor.
On exit: the m eigenvectors, stored as columns of Z; the ith column corresponds to the ith specified eigenvalue, unless fail.code= NE_CONVERGENCE (in which case see Section 6).
10:   pdz IntegerInput
On entry: the stride separating row or column elements (depending on the value of order) in the array z.
Constraints:
  • if order=Nag_ColMajor, pdz max1,n ;
  • if order=Nag_RowMajor, pdzmax1,m.
11:   ifailv[m] IntegerOutput
On exit: if fail.errnum=i>0, the first i elements of ifailv contain the indices of any eigenvectors which have failed to converge. The rest of the first m elements of ifailv are set to 0.
12:   fail NagError *Input/Output
The NAG error argument (see Section 2.7 in How to Use the NAG Library and its Documentation).

6  Error Indicators and Warnings

NE_ALLOC_FAIL
Dynamic memory allocation failed.
See Section 2.3.1.2 in How to Use the NAG Library and its Documentation for further information.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_CONSTRAINT
On entry, m=value, iblock[i]iblock[i+1]=value and w[i]w[i+1]=value.
Constraint: , for i=0,1,,m-2
NE_CONVERGENCE
value eigenvectors (as indicated by argument ifailv) each failed to converge in five iterations. The current iterate after five iterations is stored in the corresponding column of z.
NE_INT
On entry, n=value.
Constraint: n0.
On entry, pdz=value.
Constraint: pdz>0.
NE_INT_2
On entry, m=value and n=value.
Constraint: 0mn.
On entry, pdz=value and m=value.
Constraint: pdzmax1,m.
On entry, pdz=value and n=value.
Constraint: pdz max1,n .
NE_INT_ARRAY
On entry, m=value and iblock[i]iblock[i+1]=value.
Constraint: iblock[i]iblock[i+1], for i=0,1,,m-2
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.
An unexpected error has been triggered by this function. Please contact NAG.
See Section 2.7.6 in How to Use the NAG Library and its Documentation for further information.
NE_NO_LICENCE
Your licence key may have expired or may not have been installed correctly.
See Section 2.7.5 in How to Use the NAG Library and its Documentation for further information.

7  Accuracy

Each computed eigenvector zi is the exact eigenvector of a nearby matrix A+Ei, such that
Ei = Oε A ,  
where ε is the machine precision. Hence the residual is small:
A zi - λi zi = Oε A .  
However, a set of eigenvectors computed by this function may not be orthogonal to so high a degree of accuracy as those computed by nag_zsteqr (f08jsc).

8  Parallelism and Performance

nag_zstein (f08jxc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
nag_zstein (f08jxc) 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.

9  Further Comments

The real analogue of this function is nag_dstein (f08jkc).

10  Example

See Section 10 in nag_zunmtr (f08fuc).

nag_zstein (f08jxc) (PDF version)
f08 Chapter Contents
f08 Chapter Introduction
NAG Library Manual

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