The function may be called by the names: f01mec or nag_matop_real_mod_chol_perturbed_a.
f01mec computes the positive definite perturbed matrix from the factors provided by a previous call to f01mdc. For 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 ). The matrix is not explicitly formed.
If , we compute from the factorization , where is a unit upper triangular matrix.
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: – Nag_UploTypeInput
On entry: indicates whether the upper or lower triangular part of was stored and how it was factorized.
The upper triangular part of was stored and we compute such that .
The lower triangular part of was stored and we compute such that .
2: – IntegerInput
On entry: , the order of the matrix .
3: – doubleInput/Output
Note: the dimension, dim, of the array a
must be at least
On entry: the modified Cholesky factor of , as returned by f01mdc.
is stored in .
If , is upper triangular and the elements of the array below the diagonal are not set.
If , is lower triangular and the elements of the array above the diagonal are not set.
4: – IntegerInput
On entry: the stride separating row elements of the matrix in the array
The NAG error argument (see Section 7 in the Introduction to the NAG Library CL Interface).
6Error Indicators and Warnings
Dynamic memory allocation failed.
See Section 3.1.2 in the Introduction to the NAG Library CL Interface for further information.
On entry, argument had an illegal value.
On entry, .
On entry, and .
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.
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.
See Section 7 in f01mdc for an indication of the accuracy of the computed factors , , and .
8Parallelism and Performance
f01mec is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f01mec 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.
Arrays are internally allocated by f01mec. The total size of these arrays does not exceed real elements. All allocated memory is freed before return of f01mec.