Developer Reference

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

?latm3

Returns set entry of a random matrix.

Syntax

res = slatm3
(
m
,
n
,
i
,
j
,
isub
,
jsub
,
kl
,
ku
,
idist
,
iseed
,
d
,
igrade
,
dl
,
dr
,
ipvtng
,
iwork
,
sparse
)
res = dlatm3
(
m
,
n
,
i
,
j
,
isub
,
jsub
,
kl
,
ku
,
idist
,
iseed
,
d
,
igrade
,
dl
,
dr
,
ipvtng
,
iwork
,
sparse
)
res = clatm3
(
m
,
n
,
i
,
j
,
isub
,
jsub
,
kl
,
ku
,
idist
,
iseed
,
d
,
igrade
,
dl
,
dr
,
ipvtng
,
iwork
,
sparse
)
res = zlatm3
(
m
,
n
,
i
,
j
,
isub
,
jsub
,
kl
,
ku
,
idist
,
iseed
,
d
,
igrade
,
dl
,
dr
,
ipvtng
,
iwork
,
sparse
)
Include Files
  • mkl.fi
Description
The
?latm3
routine returns the (
isub
,
jsub
) entry of a random matrix of dimension (
m
,
n
) described by the other parameters. (
isub
,
jsub
) is the final position of the (
i
,
j
) entry after pivoting according to
ipvtng
and
iwork
.
?latm3
is called by the
?latmr
routine in order to build random test matrices. No error checking on parameters is done, because this routine is called in a tight loop by
?latmr
which has already checked the parameters.
Use of
?latm3
differs from
?latm2
in the order in which the random number generator is called to fill in random matrix entries. With
?latm2
, the generator is called to fill in the pivoted matrix columnwise. With
?latm3
, the generator is called to fill in the matrix columnwise, after which it is pivoted. Thus,
?latm3
can be used to construct random matrices which differ only in their order of rows and/or columns.
?latm2
is used to construct band matrices while avoiding calling the random number generator for entries outside the band (and therefore generating random numbers in different orders for different pivot orders).
The matrix whose (
isub
,
jsub
) entry is returned is constructed as follows (this routine only computes one entry):
  • If
    isub
    is outside
    (1..
    m
    )
    or
    jsub
    is outside
    (1..n)
    , returns zero (this is convenient for generating matrices in band format).
  • Generate a matrix
    A
    with random entries of distribution
    idist
    .
  • Set the diagonal to
    D
    .
  • Grade the matrix, if desired, from the left (by
    dl
    ) and/or from the right (by
    dr
    or
    dl
    ) as specified by
    igrade
    .
  • Permute, if desired, the rows and/or columns as specified by
    ipvtng
    and
    iwork
    .
  • Band the matrix to have lower bandwidth
    kl
    and upper bandwidth
    ku
    .
  • Set random entries to zero as specified by
    sparse
    .
Input Parameters
m
INTEGER
.
Number of rows of matrix.
n
INTEGER
.
Number of columns of matrix.
i