The routine may be called by the names f01mdf or nagf_matop_real_modified_cholesky.
Given a symmetric, possibly indefinite matrix , f01mdf 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 routine f01mef can be used to compute the matrix .
Grimes R G, and
Lewis J G
Accurate symmetric indefinite linear equation solvers
SIAM J. Matrix Anal. Appl.20
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
1: – Character(1)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 .
2: – IntegerInput
On entry: , the order of the matrix .
3: – Real (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array a
must be at least
On entry: the symmetric matrix .
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 entry: the first dimension of the array a as declared in the (sub)program from which f01mdf is called.
5: – Real (Kind=nag_wp) arrayOutput
On exit: the offdiagonals of the symmetric matrix are returned in , for and in , for . See Section 9 for further details.
6: – Integer arrayOutput
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.
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: – Real (Kind=nag_wp)Input
On entry: the value of .
8: – IntegerInput/Output
On entry: ifail must be set to , or to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of means that an error message is printed while a value of means that it is not.
If halting is not appropriate, the value or is recommended. If message printing is undesirable, then the value is recommended. Otherwise, the value is recommended. When the value or is used it is essential to test the value of ifail on exit.
On exit: unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry or , explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
On entry, . Constraint: or .
On entry, .
On entry, and .
On entry, . Constraint: .
An intermediate eigenproblem could not be solved. This should not occur. Please contact NAG with details of your call.
An unexpected error has been triggered by this routine. Please
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
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 .
8Parallelism and Performance
f01mdf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f01mdf 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 routine. 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. Experimental 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 .
This example computes the modified Cholesky factorization , for the indefinite matrix , where
The output is then passed to f01mef to explicitly form the matrix and the norm of is computed.