NAG CL Interface
f01mdc (real_modified_cholesky)
1
Purpose
f01mdc computes the Cheng–Higham modified Cholesky factorization of a real symmetric matrix.
2
Specification
The function may be called by the names: f01mdc or nag_matop_real_modified_cholesky.
3
Description
Given a symmetric, possibly indefinite matrix
,
f01mdc finds the Cheng–Higham modified Cholesky factorization
when
. Here
is a unit lower triangular matrix,
is a permutation matrix,
is a symmetric block diagonal matrix (with blocks of order
or
) with minimum eigenvalue
, and
is a perturbation matrix of small norm chosen so that such a factorization can be found. Note that
is not computed explicitly.
If , we compute the factorization , where is a unit upper triangular matrix.
If the matrix
is symmetric positive definite, the algorithm ensures that
. The function
f01mec can be used to compute the matrix
.
4
References
Ashcraft C,
Grimes R G, and
Lewis J G
(1998)
Accurate symmetric indefinite linear equation solvers
SIAM J. Matrix Anal. Appl.
20
513–561
Cheng S H and Higham N J (1998) A modified Cholesky algorithm based on a symmetric indefinite factorization SIAM J. Matrix Anal. Appl. 19(4) 1097–1110
5
Arguments
-
1:
– Nag_UploType
Input
-
On entry: specifies whether the upper or lower triangular part of
is stored and how
is to be factorized.
- The upper triangular part of is stored and we compute .
- The lower triangular part of is stored and we compute .
Constraint:
or .
-
2:
– Integer
Input
-
On entry: , the order of the matrix .
Constraint:
.
-
3:
– double
Input/Output
-
Note: the dimension,
dim, of the array
a
must be at least
.
On entry: the
symmetric matrix
.
is stored in .
If , the upper triangular part of must be stored and the elements of the array below the diagonal are not referenced.
If , the lower triangular part of must be stored and the elements of the array above the diagonal are not referenced.
On exit:
a is overwritten.
is stored in .
See
Section 9 for further details.
-
4:
– Integer
Input
On entry: the stride separating row elements of the matrix
in the array
a.
Constraint:
.
-
5:
– double
Output
-
On exit: the offdiagonals of the symmetric matrix
are returned in
, for
and in
, for
. See
Section 9 for further details.
-
6:
– Integer
Output
-
On exit: gives the permutation information of the factorization. The entries of
ipiv are either positive, indicating a
pivot block, or pairs of negative entries, indicating a
pivot block.
- The th and th rows and columns of were interchanged and is a block.
- and
- The th and th rows and columns, and the st and th rows and columns, were interchanged and has the block:
- If , is stored in . The interchanges were made in the order .
- If , is stored in . The interchanges were made in the order .
-
7:
– double
Input
-
On entry: the value of .
Constraint:
.
-
8:
– 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 had an illegal value.
- NE_EIGENPROBLEM
-
An intermediate eigenproblem could not be solved. This should not occur. Please contact
NAG with details of your call.
- NE_INT
-
On entry, .
Constraint: .
- NE_INT_2
-
On entry, and .
Constraint: .
- 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.
- NE_REAL
-
On entry, .
Constraint: .
7
Accuracy
If
, the computed factors
and
are the exact factors not of
but of
, where
is a modest linear function of
, and
is the
machine precision.
If , a similar statement holds for the computed factors and .
8
Parallelism and Performance
f01mdc is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f01mdc 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 elements of the main diagonal of
overwrite the corresponding elements of the main diagonal of
; the
elements of the subdiagonal (and superdiagonal, by symmetry) elements of
are stored in the array
offdiag. If
, then these are stored in
that is
, for
is stored in
; otherwise, they are stored in
, with
stored in
.
The unit diagonal elements of
or
are not stored. The remaining elements of
or
are stored explicitly in either the strictly upper or strictly lower triangular part of the array
a, respectively.
The total number of floating-point operations is approximately
. The searching overhead for rook pivoting used by the algorithm is between
and
comparisons. Experimnetal evidence suggests
comparisons are usual, see
Ashcraft et al. (1998).
All of the entries of the triangular matrix or are bounded above (by approximately ), and, therefore, the norm of the matrix itself is also bounded.
The exact size of the perturbation matrix
cannot be predicted
a priori. However, the algorithm attempts to ensure that it is not much greater than the minimum perturbation
such that
has the minimum eigenvalue
. In particular, it should be zero when
is positive definite and
. If
, then in general it can be shown that
where
and
denote the largest and smallest eigenvalues of the matrix in question. A similar result holds if
.
10
Example
This example computes the modified Cholesky factorization
, for the indefinite the matrix
, where
The output is then passed to
f01mec to explicitly form the matrix
and the norm of
is computed.
10.1
Program Text
10.2
Program Data
10.3
Program Results