# NAG FL Interfacef06tyf (zgesrs)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

f06tyf applies to a complex rectangular matrix a sequence of plane rotations having real sines and complex cosines.

## 2Specification

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

## 3Description

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

None.

## 5Arguments

1: $\mathbf{side}$Character(1) Input
On entry: specifies whether $A$ is operated on from the left or the right.
${\mathbf{side}}=\text{'L'}$
$A$ is pre-multiplied from the left.
${\mathbf{side}}=\text{'R'}$
$A$ is post-multiplied from the right.
Constraint: ${\mathbf{side}}=\text{'L'}$ or $\text{'R'}$.
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{m}$Integer Input
On entry: $m$, the number of rows of the matrix $A$.
Constraint: ${\mathbf{m}}\ge 0$.
5: $\mathbf{n}$Integer Input
On entry: $n$, the number of columns of the matrix $A$.
Constraint: ${\mathbf{n}}\ge 0$.
6: $\mathbf{k1}$Integer Input
7: $\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{side}}=\text{'L'}$ and ${\mathbf{k2}}>{\mathbf{m}}$, or ${\mathbf{side}}=\text{'R'}$ and ${\mathbf{k2}}>{\mathbf{n}}$, an immediate return is effected.
8: $\mathbf{c}\left(*\right)$Complex (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$.
9: $\mathbf{s}\left(*\right)$Real (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$.
10: $\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 ${\mathbf{n}}$.
On entry: the $m×n$ matrix $A$.
On exit: the transformed matrix $A$.
11: $\mathbf{lda}$Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f06tyf is called.
Constraint: ${\mathbf{lda}}\ge \mathrm{max}\phantom{\rule{0.125em}{0ex}}\left(1,{\mathbf{m}}\right)$.

None.

Not applicable.