Developer Reference

  • 2020.2
  • 07/15/2020
  • Public Content
Contents

?latm1

Computes the entries of a matrix as specified.

Syntax

call slatm1
(
mode
,
cond
,
irsign
,
idist
,
iseed
,
d
,
n
,
info
)
call dlatm1
(
mode
,
cond
,
irsign
,
idist
,
iseed
,
d
,
n
,
info
)
call clatm1
(
mode
,
cond
,
irsign
,
idist
,
iseed
,
d
,
n
,
info
)
call zlatm1
(
mode
,
cond
,
irsign
,
idist
,
iseed
,
d
,
n
,
info
)
Include Files
  • mkl.fi
Description
The
?latm1
routine computes the entries of
D
(1..
n
)
as specified by
mode
,
cond
and
irsign
.
idist
and
iseed
determine the generation of random numbers.
?latm1
is called by
slatmr
(for
slatm1
and
dlatm1
), and by
clatmr
(for
clatm1
and
zlatm1
) to generate random test matrices for LAPACK programs.
Input Parameters
mode
INTEGER
.
On entry describes how
d
is to be computed:
mode
= 0
means do not change
d
.
mode
= 1
sets
d
(1)
= 1
and
d
(2:
n
)
= 1.0/
cond
mode
= 2
sets
d
(1:
n
-1)
= 1
and
d
(
n
)
=1.0/
cond
mode
= 3
sets
d
(
i
)
=
cond
**(-(
i
-1)/(
n
-1))
mode
= 4
sets
d
(
i
)
= 1 - (
i
-1)/(
n
-1)*(1 - 1/
cond
)
mode
= 5
sets
d
to random numbers in the range
( 1/
cond
, 1 )
such that their logarithms are uniformly distributed.
mode
= 6
sets
d
to random numbers from same distribution as the rest of the matrix.
mode
< 0
has the same meaning as
abs(
mode
)
, except that the order of the elements of
d
is reversed.
Thus if
mode
is positive,
d
has entries ranging from 1 to
1/
cond
, if negative, from
1/
cond
to 1.
cond
REAL
for
slatm1
,
DOUBLE PRECISION
for
dlatm1
,
REAL
for
clatm1
,
DOUBLE PRECISION
for
zlatm1
,
On entry, used as described under
mode
above. If used, it must be
1
.
irsign
INTEGER
.
On entry, if
mode
is not -6, 0, or 6, determines sign of entries of
d
.
If
irsign
= 0
, entries of
d
are unchanged.
If
irsign
= 1
, each entry of
d
is multiplied by a random complex number uniformly distributed with absolute value 1.
idist
INTEGER
.
Specifies the distribution of the random numbers.
For
slatm1
and
dlatm1
:
= 1: uniform (0,1)
= 2: uniform (-1,1)
= 3: normal (0,1)
For
clatm1
and
zlatm1
:
= 1: real and imaginary parts each uniform (0,1)
= 2: real and imaginary parts each uniform (-1,1)
= 3: real and imaginary parts each normal (0,1)
= 4: complex number uniform in disk(0, 1)
iseed
INTEGER
.
Array, size (4).