PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_zhbgst (f08us)
Purpose
nag_lapack_zhbgst (f08us) reduces a complex Hermitian-definite generalized eigenproblem
to the standard form
, where
and
are band matrices,
is a complex Hermitian matrix, and
has been factorized by
nag_lapack_zpbstf (f08ut).
Syntax
Description
To reduce the complex Hermitian-definite generalized eigenproblem
to the standard form
, where
,
and
are banded,
nag_lapack_zhbgst (f08us) must be preceded by a call to
nag_lapack_zpbstf (f08ut) which computes the split Cholesky factorization of the positive definite matrix
:
. The split Cholesky factorization, compared with the ordinary Cholesky factorization, allows the work to be approximately halved.
This function overwrites with , where and is a unitary matrix chosen (implicitly) to preserve the bandwidth of . The function also has an option to allow the accumulation of , and then, if is an eigenvector of , is an eigenvector of the original system.
References
Crawford C R (1973) Reduction of a band-symmetric generalized eigenvalue problem Comm. ACM 16 41–44
Kaufman L (1984) Banded eigenvalue solvers on vector machines ACM Trans. Math. Software 10 73–86
Parameters
Compulsory Input Parameters
- 1:
– string (length ≥ 1)
-
Indicates whether
is to be returned.
- is not returned.
- is returned.
Constraint:
or .
- 2:
– string (length ≥ 1)
-
Indicates whether the upper or lower triangular part of
is stored.
- The upper triangular part of is stored.
- The lower triangular part of is stored.
Constraint:
or .
- 3:
– int64int32nag_int scalar
-
If
, the number of superdiagonals,
, of the matrix
.
If , the number of subdiagonals, , of the matrix .
Constraint:
.
- 4:
– int64int32nag_int scalar
-
If
, the number of superdiagonals,
, of the matrix
.
If , the number of subdiagonals, , of the matrix .
Constraint:
.
- 5:
– complex array
-
The first dimension of the array
ab must be at least
.
The second dimension of the array
ab must be at least
.
The upper or lower triangle of the
by
Hermitian band matrix
.
The matrix is stored in rows
to
, more precisely,
- if , the elements of the upper triangle of within the band must be stored with element in ;
- if , the elements of the lower triangle of within the band must be stored with element in
- 6:
– complex array
-
The first dimension of the array
bb must be at least
.
The second dimension of the array
bb must be at least
.
The banded split Cholesky factor of
as specified by
uplo,
n and
kb and returned by
nag_lapack_zpbstf (f08ut).
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the second dimension of the arrays
ab,
bb.
, the order of the matrices and .
Constraint:
.
Output Parameters
- 1:
– complex array
-
The first dimension of the array
ab will be
.
The second dimension of the array
ab will be
.
The upper or lower triangle of
ab stores the corresponding upper or lower triangle of
as specified by
uplo.
- 2:
– complex array
-
The first dimension,
, of the array
x will be
- if , ;
- if , .
The second dimension of the array
x will be
if
and at least
if
.
The
by
matrix
, if
.
If
,
x is not referenced.
- 3:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
-
If , parameter had an illegal value on entry. The parameters are numbered as follows:
1:
vect, 2:
uplo, 3:
n, 4:
ka, 5:
kb, 6:
ab, 7:
ldab, 8:
bb, 9:
ldbb, 10:
x, 11:
ldx, 12:
work, 13:
rwork, 14:
info.
It is possible that
info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.
Accuracy
Forming the reduced matrix is a stable procedure. However it involves implicit multiplication by . When nag_lapack_zhbgst (f08us) is used as a step in the computation of eigenvalues and eigenvectors of the original problem, there may be a significant loss of accuracy if is ill-conditioned with respect to inversion.
Further Comments
The total number of real floating-point operations is approximately , when , assuming ; there are an additional operations when .
The real analogue of this function is
nag_lapack_dsbgst (f08ue).
Example
This example computes all the eigenvalues of
, where
and
Here
is Hermitian,
is Hermitian positive definite, and
and
are treated as band matrices.
must first be factorized by
nag_lapack_zpbstf (f08ut). The program calls
nag_lapack_zhbgst (f08us) to reduce the problem to the standard form
, then
nag_lapack_zhbtrd (f08hs) to reduce
to tridiagonal form, and
nag_lapack_dsterf (f08jf) to compute the eigenvalues.
Open in the MATLAB editor:
f08us_example
function f08us_example
fprintf('f08us example results\n\n');
n = 4;
ka = int64(2);
a = [ -1.13+0.00i 1.94-2.10i -1.40+0.25i 0.00+0.00i;
1.94+2.10i -1.91+0.00i -0.82-0.89i -0.67+0.34i;
-1.40-0.25i -0.82+0.89i -1.87+0.00i -1.10-0.16i;
0.00+0.00i -0.67-0.34i -1.10+0.16i 0.50+0.00i];
kb = int64(1);
b = [ 9.89+0.00i 1.08-1.73i 0.00+0.00i 0.00+0.00i;
1.08+1.73i 1.69+0.00i -0.04+0.29i 0.00+0.00i;
0.00+0.00i -0.04-0.29i 2.65+0.00i -0.33+2.24i;
0.00+0.00i 0.00+0.00i -0.33-2.24i 2.17+0.00i];
[~, ab, ifail] = f01zd( ...
'P', ka, ka, a, complex(zeros(ka+ka+1,n)));
[~, bb, ifail] = f01zd(...
'P', kb, kb, b, complex(zeros(kb+kb+1,n)));
ab = ab(1:ka+1,1:n);
bb = bb(1:kb+1,1:n);
uplo = 'Upper';
[ub, info] = f08ut( ...
uplo, kb, bb);
vect = 'N';
[cb, x, info] = f08us( ...
vect, uplo, ka, kb, ab, ub);
jobz = 'No Vectors';
[~, w, ~, info] = f08hn( ...
jobz, uplo, ka, cb);
disp('Eigenvalues:');
disp(w');
f08us example results
Eigenvalues:
-6.6089 -2.0416 0.1603 1.7712
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015