?larot
?larot
Applies a Givens rotation to two adjacent rows or columns.
Syntax
void slarot
(
lapack_logical
*lrows
,
lapack_logical
*ileft
,
lapack_logical
*iright
,
lapack_int
*nl
,
float
*c
,
float
*s
,
float
*a
,
lapack_int
*lda
,
float
*xleft
,
float
*xright
);
void dlarot
(
lapack_logical
*lrows
,
lapack_logical
*ileft
,
lapack_logical
*iright
,
lapack_int
*nl
,
double
*c
,
double
*s
,
double
*a
,
lapack_int
*lda
,
double
*xleft
,
double
*xright
);
void clarot
(
lapack_logical
*lrows
,
lapack_logical
*ileft
,
lapack_logical
*iright
,
lapack_int
*nl
,
lapack_complex
*c
,
lapack_complex
*s
,
lapack_complex
*a
,
lapack_int
*lda
,
lapack_complex
*xleft
,
lapack_complex
*xright
);
void zlarot
(
lapack_logical
*lrows
,
lapack_logical
*ileft
,
lapack_logical
*iright
,
lapack_int
*nl
,
lapack_complex_double
*c
,
lapack_complex_double
*s
,
lapack_complex_double
*a
,
lapack_int
*lda
,
lapack_complex_double
*xleft
,
lapack_complex_double
*xright
);
Include Files
- mkl.h
Description
The routine
?larot
applies a Givens rotation to two adjacent rows or columns,
where one element of the first or last column or row is stored in some format other than GE so that elements of
the matrix may be used or modified for which no array element is
provided. One example is a symmetric matrix in SB format
(bandwidth = 4), for which . Two adjacent rows will have the
format:
uplo
= 'L'
row j : C > C > C > C > C > . . . . row j + 1 : C > C > C > C > C > . . . .
'*'
indicates elements for which
storage is provided. '.'
indicates elements for which no storage is
provided, but are not necessarily zero; their values are determined
by symmetry. ' '
indicates elements which are required to be zero, and
have no storage provided. Those columns which have two
'*'
entries can be
handled by srot
(for slarot
and clarot
), or by drot
( for dlarot
and zlarot
). Those columns which have no
'*'
entries can be ignored,
since as long as the Givens rotations are carefully applied to
preserve symmetry, their values are determined. Those columns which
have one
'*'
have to be handled separately, by using separate
variables p
and q
: row j : C > C > C > C > C > p. . . . row j + 1 : q C > C > C > C > C > . . . .
If element
p
is set correctly, ?larot
rotates the column and sets p
to its new value. The next call to ?larot
rotates
columns j
and j
+1, and restore symmetry. The element q
is zero at the beginning, and non-zero after the rotation.
Later, rotations would presumably be chosen to zero q
out. Typical
Calling Sequences: rotating the
i
-th and (
st rows. i
+1)-Input Parameters
- lrows
- If,lrows=1?larotrotates two rows.If,lrows=0?larotrotates two columns.
- lleft
- If,lleft=1xleftis used instead of the corresponding element ofafor the first element in the second row (if) or column (iflrows=0).lrows=1If, the corresponding element oflleft=0ais used.
- lright
- If,lleft=1xrightis used instead of the corresponding element ofafor the first element in the second row (if) or column (iflrows=0).lrows=1If, the corresponding element oflright=0ais used.
- nl
- The length of the rows (if) or columns (iflrows=1) to be rotated.lrows=1Ifxleftorxrightare used, the columns or rows they are in should be included innl, e.g., if, thenlleft=lright=1nlmust be at least 2.The number of rows or columns to be rotated exclusive of those involvingxleftand/orxrightmay not be negative, i.e.,nlminus how many oflleftandlrightare1must be at least zero; if not,xerblais called.
- c, s
- Specify the Givens rotation to be applied.If, then the matrixlrows=1is applied from the left.If, then the transpose thereof is applied from the right.lrows=0
- a
- The array containing the rows or columns to be rotated. The first element ofashould be the upper left element to be rotated.
- lda
- The "effective" leading dimension ofa.Ifacontains a matrix stored in GE or SY format, then this is just the leading dimension ofA.Ifacontains a matrix stored in band (GB or SB) format, then this should be one less than the leading dimension used in the calling routine. Thus, ifain?larotis of size, thenlda*na[(would be thej- 1)*lda]j-th element in the first of the two rows to be rotated, anda[(would be thej- 1)*lda+ 1]j-th in the second, regardless of how the array may be stored in the calling routine.acannot be dimensioned, because for band format the row number may exceedlda, which is not legal FORTRAN.If, thenlrows=1ldamust be at least 1, otherwise it must be at leastnlminus the number of1values inxleftandxright.
- xleft
- If,lrows=1xleftis used and modified instead ofa[1](if) orlrows=1a[(iflda+ 1]).lrows=0
- xright
- If,lright=1xrightis used and modified instead ofa[((ifnl- 1)*lda]) orlrows=1a[(ifnl- 1]).lrows=0
Output Parameters
- a
- On exit, modified arrayA.