# NAG FL Interfacef06tmf (zhesrc)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f06tmf performs a Unitary similarity transformation (as a sequence of plane rotations) of a complex Hermitian matrix.

## 2Specification

Fortran Interface
 Subroutine f06tmf ( uplo, n, k1, k2, c, s, a, lda)
 Integer, Intent (In) :: n, k1, k2, lda Real (Kind=nag_wp), Intent (In) :: c(*) Complex (Kind=nag_wp), Intent (In) :: s(*) Complex (Kind=nag_wp), Intent (Inout) :: a(lda,*) Character (1), Intent (In) :: uplo, pivot, direct
#include <nag.h>
 void f06tmf_ (const char *uplo, const char *pivot, const char *direct, const Integer *n, const Integer *k1, const Integer *k2, const double c[], const Complex s[], Complex a[], const Integer *lda, const Charlen length_uplo, const Charlen length_pivot, const Charlen length_direct)
The routine may be called by the names f06tmf or nagf_blas_zhesrc.

## 3Description

f06tmf performs the transformation
 $A←PAPH$
where $A$ is an $n×n$ complex Hermitian matrix, and $P$ is a complex unitary matrix defined as a sequence of plane rotations, ${P}_{k}$, applied in planes ${k}_{1}$ to ${k}_{2}$.
The $2×2$ plane rotation part of ${P}_{k}$ is assumed to have the form
 $( ck s¯k -sk ck )$
with ${c}_{k}$ real.

None.

## 5Arguments

1: $\mathbf{uplo}$Character(1) Input
On entry: specifies whether the upper or lower triangular part of $A$ is stored.
${\mathbf{uplo}}=\text{'U'}$
The upper triangular part of $A$ is stored.
${\mathbf{uplo}}=\text{'L'}$
The lower triangular part of $A$ is stored.
Constraint: ${\mathbf{uplo}}=\text{'U'}$ or $\text{'L'}$.
2: $\mathbf{pivot}$Character(1) Input
On entry: specifies the plane rotated by ${P}_{k}$.
${\mathbf{pivot}}=\text{'V'}$ (variable pivot)
${P}_{k}$ rotates the $\left(k,k+1\right)$ plane.
${\mathbf{pivot}}=\text{'T'}$ (top pivot)
${P}_{k}$ rotates the $\left({k}_{1},k+1\right)$ plane.
${\mathbf{pivot}}=\text{'B'}$ (bottom pivot)
${P}_{k}$ rotates the $\left(k,{k}_{2}\right)$ plane.
Constraint: ${\mathbf{pivot}}=\text{'V'}$, $\text{'T'}$ or $\text{'B'}$.
3: $\mathbf{direct}$Character(1) Input
On entry: specifies the sequence direction.
${\mathbf{direct}}=\text{'F'}$ (forward sequence)
$P={P}_{{k}_{2}-1}\cdots {P}_{{k}_{1}+1}{P}_{{k}_{1}}$.
${\mathbf{direct}}=\text{'B'}$ (backward sequence)
$P={P}_{{k}_{1}}{P}_{{k}_{1}+1}\cdots {P}_{{k}_{2}-1}$.
Constraint: ${\mathbf{direct}}=\text{'F'}$ or $\text{'B'}$.
4: $\mathbf{n}$Integer Input
On entry: $n$, the order of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 0$.
5: $\mathbf{k1}$Integer Input
6: $\mathbf{k2}$Integer Input
On entry: the values ${k}_{1}$ and ${k}_{2}$.
If ${\mathbf{k1}}<1$ or ${\mathbf{k2}}\le {\mathbf{k1}}$ or ${\mathbf{k2}}>{\mathbf{n}}$, an immediate return is effected.
7: $\mathbf{c}\left(*\right)$Real (Kind=nag_wp) array Input
Note: the dimension of the array c must be at least ${\mathbf{k2}}-1$.
On entry: ${\mathbf{c}}\left(\mathit{k}\right)$ must hold ${c}_{\mathit{k}}$, the cosine of the rotation ${P}_{\mathit{k}}$, for $\mathit{k}={\mathit{k}}_{1},\dots ,{\mathit{k}}_{2}-1$.
8: $\mathbf{s}\left(*\right)$Complex (Kind=nag_wp) array Input
Note: the dimension of the array s must be at least ${\mathbf{k2}}-1$.
On entry: ${\mathbf{s}}\left(\mathit{k}\right)$ must hold ${s}_{\mathit{k}}$, the sine of the rotation ${P}_{\mathit{k}}$, for $\mathit{k}={\mathit{k}}_{1},\dots ,{\mathit{k}}_{2}-1$.
9: $\mathbf{a}\left({\mathbf{lda}},*\right)$Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array a must be at least $\mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.
On entry: the $n×n$ Hermitian matrix $A$.
• If ${\mathbf{uplo}}=\text{'U'}$, the upper triangular part of $A$ must be stored and the elements of the array below the diagonal are not referenced.
• If ${\mathbf{uplo}}=\text{'L'}$, the lower triangular part of $A$ must be stored and the elements of the array above the diagonal are not referenced.
On exit: the transformed matrix $A$. The imaginary parts of the diagonal elements are set to zero.
10: $\mathbf{lda}$Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f06tmf is called.
Constraint: ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{n}}\right)$.

None.

Not applicable.

## 8Parallelism and Performance

f06tmf is not threaded in any implementation.