NAG Library Function Document
nag_zstein (f08jxc)
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
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
, but may also be used when the eigenvalues have been computed by other functions in
Chapters f02 or
f08.
The eigenvectors of
are real, but are stored by this function in a complex array. If
has been formed by reduction of a full complex Hermitian matrix
to tridiagonal form, then eigenvectors of
may be transformed to (complex) eigenvectors of
by a call to
nag_zunmtr (f08fuc) or
nag_zupmtr (f08guc).
nag_dstebz (f08jjc) determines whether the matrix
splits into block diagonal form:
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
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:
– 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
. See
Section 3.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:
or .
- 2:
– IntegerInput
-
On entry: , the order of the matrix .
Constraint:
.
- 3:
– const doubleInput
-
Note: the dimension,
dim, of the array
d
must be at least
.
On entry: the diagonal elements of the tridiagonal matrix .
- 4:
– const doubleInput
-
Note: the dimension,
dim, of the array
e
must be at least
.
On entry: the off-diagonal elements of the tridiagonal matrix .
- 5:
– IntegerInput
-
On entry: , the number of eigenvectors to be returned.
Constraint:
.
- 6:
– const doubleInput
-
Note: the dimension,
dim, of the array
w
must be at least
.
On entry: the eigenvalues of the tridiagonal matrix
stored in
to
, as returned by
nag_dstebz (f08jjc) with
. 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 , , for .
- 7:
– const IntegerInput
-
Note: the dimension,
dim, of the array
iblock
must be at least
.
On entry: the first
elements must contain the sub-matrix indices associated with the specified eigenvalues, as returned by
nag_dstebz (f08jjc) with
. If the eigenvalues were not computed by
nag_dstebz (f08jjc) with
, set
to
, for
.
Constraint:
, for .
- 8:
– const IntegerInput
-
Note: the dimension,
dim, of the array
isplit
must be at least
.
On entry: the points at which
breaks up into sub-matrices, as returned by
nag_dstebz (f08jjc) with
. If the eigenvalues were not computed by
nag_dstebz (f08jjc) with
, set
to
n.
- 9:
– ComplexOutput
-
Note: the dimension,
dim, of the array
z
must be at least
- when
;
- when
.
The
th element of the matrix
is stored in
- when ;
- when .
On exit: the
eigenvectors, stored as columns of
; the
th column corresponds to the
th specified eigenvalue, unless
NE_CONVERGENCE (in which case see
Section 6).
- 10:
– IntegerInput
-
On entry: the stride separating row or column elements (depending on the value of
order) in the array
z.
Constraints:
- if ,
;
- if , .
- 11:
– IntegerOutput
-
On exit: if
, the first
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
.
- 12:
– NagError *Input/Output
-
The NAG error argument (see
Section 3.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 had an illegal value.
- NE_CONSTRAINT
-
On entry, , and .
Constraint: , for
- NE_CONVERGENCE
-
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, .
Constraint: .
On entry, .
Constraint: .
- NE_INT_2
-
On entry, and .
Constraint: .
On entry, and .
Constraint: .
On entry, and .
Constraint: .
- NE_INT_ARRAY
-
On entry, and .
Constraint: , for
- 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 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
is the exact eigenvector of a nearby matrix
, such that
where
is the
machine precision. Hence the residual is small:
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.
The real analogue of this function is
nag_dstein (f08jkc).
10
Example
See
Section 10 in
nag_zunmtr (f08fuc).