NAG CL Interface
f08jkc (dstein)

Settings help

CL Name Style:


1 Purpose

f08jkc computes the eigenvectors of a real symmetric tridiagonal matrix corresponding to specified eigenvalues, by inverse iteration.

2 Specification

#include <nag.h>
void  f08jkc (Nag_OrderType order, Integer n, const double d[], const double e[], Integer m, const double w[], const Integer iblock[], const Integer isplit[], double z[], Integer pdz, Integer ifailv[], NagError *fail)
The function may be called by the names: f08jkc, nag_lapackeig_dstein or nag_dstein.

3 Description

f08jkc 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 f08jjc with rank=Nag_ByBlock, but may also be used when the eigenvalues have been computed by other functions in Chapters F02 or F08.
If T has been formed by reduction of a full real symmetric matrix A to tridiagonal form, then eigenvectors of T may be transformed to eigenvectors of A by a call to f08fgc or f08ggc.
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_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 order=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: order=Nag_RowMajor or Nag_ColMajor.
2: n Integer Input
On entry: n, the order of the matrix T.
Constraint: n0.
3: d[dim] const double Input
Note: the dimension, dim, of the array d must be at least max(1,n).
On entry: the diagonal elements of the tridiagonal matrix T.
4: e[dim] const double Input
Note: the dimension, dim, of the array e must be at least max(1,n-1).
On entry: the off-diagonal elements of the tridiagonal matrix T.
5: m Integer Input
On entry: m, the number of eigenvectors to be returned.
Constraint: 0mn.
6: w[dim] const double Input
Note: the dimension, dim, of the array w must be at least max(1,n).
On entry: the eigenvalues of the tridiagonal matrix T stored in w[0] to w[m-1], as returned by 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 Integer Input
Note: the dimension, dim, of the array iblock must be at least max(1,n).
On entry: the first m elements must contain the sub-matrix indices associated with the specified eigenvalues, as returned by f08jjc with rank=Nag_ByBlock. If the eigenvalues were not computed by 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 Integer Input
Note: the dimension, dim, of the array isplit must be at least max(1,n).
On entry: the points at which T breaks up into sub-matrices, as returned by f08jjc with rank=Nag_ByBlock. If the eigenvalues were not computed by f08jjc with rank=Nag_ByBlock, set isplit[0] to n.
9: z[dim] double Output
Note: the dimension, dim, of the array z must be at least
  • max(1,pdz×m) when order=Nag_ColMajor;
  • max(1,n×pdz) when order=Nag_RowMajor.
The (i,j)th 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 Integer Input
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 max(1,n) ;
  • if order=Nag_RowMajor, pdzmax(1,m).
11: ifailv[m] Integer Output
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 7 in the Introduction to the NAG Library CL Interface).

6 Error 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.
NE_BAD_PARAM
On entry, argument value had an illegal value.
NE_CONSTRAINT
Constraint: iblock[i]iblock[i+1], for i=0,1,,m-2.
Constraint: if iblock[i]=iblock[i+1], w[i]w[i+1], 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: pdzmax(1,m).
On entry, pdz=value and n=value.
Constraint: pdz max(1,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.
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.

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:
Azi-λizi = 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 f08jec.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f08jkc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f08jkc 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 complex analogue of this function is f08jxc.

10 Example

See f08fgc.