f01ff computes the matrix function, , of a complex Hermitian by matrix . must also be a complex Hermitian matrix.
Syntax
C# |
---|
public static void f01ff( string uplo, int n, Complex[,] a, F01..::..F01FF_F f, out int iflag, out int ifail ) |
Visual Basic |
---|
Public Shared Sub f01ff ( _ uplo As String, _ n As Integer, _ a As Complex(,), _ f As F01..::..F01FF_F, _ <OutAttribute> ByRef iflag As Integer, _ <OutAttribute> ByRef ifail As Integer _ ) |
Visual C++ |
---|
public: static void f01ff( String^ uplo, int n, array<Complex,2>^ a, F01..::..F01FF_F^ f, [OutAttribute] int% iflag, [OutAttribute] int% ifail ) |
F# |
---|
static member f01ff : uplo : string * n : int * a : Complex[,] * f : F01..::..F01FF_F * iflag : int byref * ifail : int byref -> unit |
Parameters
- uplo
- Type: System..::..StringOn entry: if , the upper triangle of the matrix is stored.If , the lower triangle of the matrix is stored.Constraint: or .
- n
- Type: System..::..Int32On entry: , the order of the matrix .Constraint: .
- a
- Type: array<NagLibrary..::..Complex,2>[,](,)[,][,]An array of size [dim1, dim2]Note: dim1 must satisfy the constraint:Note: the second dimension of the array a must be at least .On entry: the by Hermitian 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 exit: if , the upper or lower triangular part of the by matrix function, .
- f
- Type: NagLibrary..::..F01..::..F01FF_FThe method f evaluates at a number of points .
A delegate of type F01FF_F.
- iflag
- Type: System..::..Int32%
- ifail
- Type: System..::..Int32%On exit: unless the method detects an error or a warning has been flagged (see [Error Indicators and Warnings]).
Description
is computed using a spectral factorization of
where is the real diagonal matrix whose diagonal elements, , are the eigenvalues of , is a unitary matrix whose columns are the eigenvectors of and is the conjugate transpose of . is then given by
where is the diagonal matrix whose th diagonal element is . See for example Section 4.5 of Higham (2008). is assumed to be real.
References
Higham N J (2008) Functions of Matrices: Theory and Computation SIAM, Philadelphia, PA, USA
Error Indicators and Warnings
Errors or warnings detected by the method:
Some error messages may refer to parameters that are dropped from this interface
(LDA) In these
cases, an error in another parameter has usually caused an incorrect value to be inferred.
- If , the th argument had an illegal value.
- iflag has been set nonzero by the user.
- Internal memory allocation failed.
- The algorithm to compute the spectral factorization failed to converge; off-diagonal elements of an intermediate tridiagonal form did not converge to zero (see f08fn).Note: this failure is unlikely to occur.
Accuracy
Provided that can be computed accurately then the computed matrix function will be close to the exact matrix function. See Section 10.2 of Higham (2008) for details and further discussion.
Parallelism and Performance
None.
Further Comments
The cost of the algorithm is plus the cost of evaluating .
If is the th computed eigenvalue of , then the user-supplied method f will be asked to evaluate the function at , for .
For further information on matrix functions, see Higham (2008).
f01ef can be used to find the matrix function for a real symmetric matrix .
Example
This example finds the matrix cosine, , of the Hermitian matrix
Example program (C#): f01ffe.cs