NAG FL Interface
f01mef (real_​mod_​chol_​perturbed_​a)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f01mef computes the positive definite perturbed matrix A+E from the factors of a modified Cholesky factorization of a real symmetric matrix, A.

2 Specification

Fortran Interface
Subroutine f01mef ( uplo, n, a, lda, offdiag, ipiv, ifail)
Integer, Intent (In) :: n, lda, ipiv(n)
Integer, Intent (Inout) :: ifail
Real (Kind=nag_wp), Intent (In) :: offdiag(n)
Real (Kind=nag_wp), Intent (Inout) :: a(lda,*)
Character (1), Intent (In) :: uplo
C Header Interface
#include <nag.h>
void  f01mef_ (const char *uplo, const Integer *n, double a[], const Integer *lda, const double offdiag[], const Integer ipiv[], Integer *ifail, const Charlen length_uplo)
The routine may be called by the names f01mef or nagf_matop_real_mod_chol_perturbed_a.

3 Description

f01mef computes the positive definite perturbed matrix A+E from the factors provided by a previous call to f01mdf. For a symmetric, possibly indefinite matrix A, f01mdf finds the Cheng–Higham modified Cholesky factorization
PT(A+E)P=LDLT ,  
when uplo='L'. Here L is a unit lower triangular matrix, P is a permutation matrix, D is a symmetric block diagonal matrix (with blocks of order 1 or 2). The matrix E is not explicitly formed.
If uplo='U', we compute A+E from the factorization PT(A+E)P=UDUT, where U is a unit upper triangular matrix.

4 References

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: uplo Character(1) Input
On entry: indicates whether the upper or lower triangular part of A was stored and how it was factorized.
uplo='U'
The upper triangular part of A was stored and we compute A+E such that PT(A+E)P=UDUT.
uplo='L'
The lower triangular part of A was stored and we compute A+E such that PT(A+E)P=LDLT.
Constraint: uplo='U' or 'L'.
2: n Integer Input
On entry: n, the order of the matrix A.
Constraint: n>0.
3: a(lda,*) Real (Kind=nag_wp) array Input/Output
Note: the second dimension of the array a must be at least max(1,n).
On entry: the modified Cholesky factor of A, as returned by f01mdf.
On exit:
  • If uplo='U', the upper triangular part of A+E is returned and the elements of the array below the diagonal are not referenced.
  • If uplo='L', the lower triangular part of A+E is returned and the elements of the array above the diagonal are not referenced.
4: lda Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f01mef is called.
Constraint: ldan.
5: offdiag(n) Real (Kind=nag_wp) array Input
On entry: the array offdiag as returned by f01mdf.
6: ipiv(n) Integer array Input
On entry: the array ipiv as returned by f01mdf.
7: ifail Integer Input/Output
On entry: ifail must be set to 0, −1 or 1 to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of 0 causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of −1 means that an error message is printed while a value of 1 means that it is not.
If halting is not appropriate, the value −1 or 1 is recommended. If message printing is undesirable, then the value 1 is recommended. Otherwise, the value 0 is recommended. When the value -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry ifail=0 or −1, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
ifail=1
On entry, uplo=value.
Constraint: uplo='U' or 'L'.
ifail=2
On entry, n=value.
Constraint: n>0.
ifail=3
On entry, lda=value and n=value.
Constraint: ldan.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
ifail=-399
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.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

See Section 7 in f01mdf for an indication of the accuracy of the computed factors L, U, and D.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
f01mef is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f01mef 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.

9 Further Comments

Arrays are internally allocated by f01mef. The total size of these arrays does not exceed n2 real elements. All allocated memory is freed before return of f01mef.

10 Example

See f01mdf.