?laror
?laror
Pre- or post-multiplies an
m
-by-n
matrix by a random orthogonal/unitary
matrix.Syntax
void slaror
(
char
*side
,
char
*init
,
lapack_int
*m
,
lapack_int
*n
,
float
*a
,
lapack_int
*lda
,
lapack_int
*iseed
,
float
*x
,
lapack_int
*info
);
void dlaror
(
char
*side
,
char
*init
,
lapack_int
*m
,
lapack_int
*n
,
double
*a
,
lapack_int
*lda
,
lapack_int
*iseed
,
double
*x
,
lapack_int
*info
);
void claror
(
char
*side
,
char
*init
,
lapack_int
*m
,
lapack_int
*n
,
lapack_complex
*a
,
lapack_int
*lda
,
lapack_int
*iseed
,
lapack_complex
*x
,
lapack_int
*info
);
void zlaror
(
char
*side
,
char
*init
,
lapack_int
*m
,
lapack_int
*n
,
lapack_complex_double
*a
,
lapack_int
*lda
,
lapack_int
*iseed
,
lapack_complex_double
*x
,
lapack_int
*info
);
Include Files
- mkl.h
Description
The routine
?laror
pre- or post-multiplies an m
-by-n
matrix A
by a random
orthogonal or unitary matrix U
, overwriting A
. A
may optionally be initialized
to the identity matrix before multiplying by U
. U
is generated
using the method of G.W. Stewart
(SIAM J. Numer. Anal. 17, 1980, 403-409).
Input Parameters
- side
- Specifies whetherAis multiplied byUon the left or right.forslaroranddlaror:If, multiplyside='L'Aon the left (premultiply) byU.If, multiplyside='R'Aon the right (postmultiply) byUT.If, multiplyside='C'or'T'Aon the left byUand the right byUT.forclarorandzlaror:If, multiplyside='L'Aon the left (premultiply) byU.If, multiplyside='R'Aon the right (postmultiply) byUC>.If, multiplyside='C'Aon the left byUand the right byUC>If, multiplyside='T'Aon the left byUand the right byUT.
- init
- Specifies whether or notashould be initialized to the identity matrix.If, initializeinit='I'ato (a section of) the identity matrix before applyingU.If, no initialization. Applyinit='N'Uto the input matrixA.generates square or rectangular orthogonal matrices:init='I'Form=nandside='L'or'R', the rows and the columns are orthogonal to each other.For rectangular matrices wherem<n:
- If,side='R'?larorproduces a dense matrix in which rows are orthogonal and columns are not.
- If,side='L'?larorproduces a matrix in which rows are orthogonal, firstmcolumns are orthogonal, and remaining columns are zero.
For rectangular matrices wherem>n:- If,side='L'?larorproduces a dense matrix in which columns are orthogonal and rows are not.
- Ifside='R',?larorproduces a matrix in which columns are orthogonal, firstmrows are orthogonal, and remaining rows are zero.
- m
- The number of rows ofA.
- n
- The number of columns ofA.
- a
- Array, sizeldabyn.
- lda
- The leading dimension of the arraya..lda≥max(1,m)
- iseed
- Array, size (4).On entry, specifies the seed of the random number generator. The array elements must be between 0 and 4095; if not they are reduced mod 4096. Also,iseed[3]must be odd.
- x
- Workspace array, size(3*max(.m,n))Value ofsideLength of workspace'L'2*m+n'R'2*n+m'C'or'T'3*n
Output Parameters
- a
- On exit, overwrittenbyUA( if),side='L'byAU( if),side='R'byUAUT( if).side='C'or'T'
- iseed
- The values ofiseedare changed on exit, and can be used in the next call to continue the same random number sequence.
- info
- Array, size (4).Forslaroranddlaror:If, the execution is successful.info= 0If, theinfo< 0i-th parameter had an illegal value.If, the random numbers generated byinfo= 1?larorare bad.Forclarorandzlaror:If, the execution is successful.info= 0If,info= -1sideis not'L','R','C', or'T'.If, ifinfo= -3mis negative.If, ifinfo= -4mis negative or if side is'C'or'T'andnis not equal tom.If, ifinfo= -6ldais less thanm.