PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_dsbgst (f08ue)
Purpose
nag_lapack_dsbgst (f08ue) reduces a real symmetric-definite generalized eigenproblem
to the standard form
, where
and
are band matrices,
is a real symmetric matrix, and
has been factorized by
nag_lapack_dpbstf (f08uf).
Syntax
Description
To reduce the real symmetric-definite generalized eigenproblem
to the standard form
, where
,
and
are banded,
nag_lapack_dsbgst (f08ue) must be preceded by a call to
nag_lapack_dpbstf (f08uf) 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 orthogonal 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:
– double 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
symmetric 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:
– double 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_dpbstf (f08uf).
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:
– double 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:
– double 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:
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_dsbgst (f08ue) 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 floating-point operations is approximately , when , assuming ; there are an additional operations when .
The complex analogue of this function is
nag_lapack_zhbgst (f08us).
Example
This example computes all the eigenvalues of
, where
Here
is symmetric,
is symmetric positive definite, and
and
are treated as band matrices.
must first be factorized by
nag_lapack_dpbstf (f08uf). The program calls
nag_lapack_dsbgst (f08ue) to reduce the problem to the standard form
, then
nag_lapack_dsbtrd (f08he) to reduce
to tridiagonal form, and
nag_lapack_dsterf (f08jf) to compute the eigenvalues.
Open in the MATLAB editor:
f08ue_example
function f08ue_example
fprintf('f08ue example results\n\n');
n = 4;
ka = int64(2);
a = [ 0.24, 0.39, 0.42, 0.00;
0.39, -0.11, 0.79, 0.63;
0.42, 0.79, -0.25, 0.48;
0.00, 0.63, 0.48, -0.03];
kb = int64(1);
b = [ 2.07 0.95 0.00 0.00;
0.95 1.69 -0.29 0.00;
0.00 -0.29 0.65 -0.33;
0.00 0.00 -0.33 1.17];
[~, ab, ifail] = f01zc( ...
'P', ka, ka, a, zeros(ka+ka+1,n));
[~, bb, ifail] = f01zc( ...
'P', kb, kb, b, zeros(kb+kb+1,n));
ab = ab(1:ka+1,1:n);
bb = bb(1:kb+1,1:n);
uplo = 'Upper';
[ub, info] = f08uf( ...
uplo, kb, bb);
vect = 'N';
[cb, x, info] = f08ue( ...
vect, uplo, ka, kb, ab, ub);
jobz = 'No Vectors';
[~, w, ~, info] = f08ha( ...
jobz, uplo, ka, cb);
disp('Eigenvalues:');
disp(w');
f08ue example results
Eigenvalues:
-0.8305 -0.6401 0.0992 1.8525
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015