/home/abui...N/slaror.f(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ¦‹ NAME

okay so bestie, this is the manual page for /home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/MATGEN/slaror.f β€” it lives in the Library Functions Manual, section 3, and it's literally the whole SLAROR situation. periodt. ✨


πŸŽ€ SYNOPSIS

Functions/Subroutines

  • subroutine SLAROR (side, init, m, n, a, lda, iseed, x, info) β€” SLAROR (that's the whole vibe, iykyk)

πŸ’œ Function/Subroutine Documentation

subroutine SLAROR (character side, character init, integer m, integer n, real, dimension( lda, * ) a, integer lda, integer, dimension( 4 ) iseed, real, dimension( * ) x, integer info)

SLAROR ✨ (yes bestie, again, that's it, that's the name)

🌸 Purpose

!>
!> SLAROR pre- or post-multiplies an M by N matrix A by a random
!> orthogonal 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).
!>

So like, it takes your matrix A and multiplies it by a random orthogonal matrix U β€” either before or after, depending on the vibe you pick β€” and it just overwrites A with the result. No extra output matrix, no asking permission, it's giving main character energy and it's doing the most. πŸ’… You can also have it start you off from (a section of) the identity matrix before it does the multiplication, if that's your thing. The random U comes from the method of G.W. Stewart (SIAM J. Numer. Anal. 17, 1980, 403-409) 🧚

🌈 Parameters

  • SIDE
!>          SIDE is CHARACTER*1
!>          Specifies whether A is multiplied on the left or right by U.
!>          = 'L':         Multiply A on the left (premultiply) by U
!>          = 'R':         Multiply A on the right (postmultiply) by U'
!>          = 'C' or 'T':  Multiply A on the left by U and the right
!>                          by U' (Here, U' means U-transpose.)
!>

Bestie, this is the which side switch: 'L' = left (U A), 'R' = right (A U'), and 'C' or 'T' = both, U A U'. And fr fr, U' just means U-transpose, that's the whole note. 🫢

  • INIT
!>          INIT is CHARACTER*1
!>          Specifies whether or not A should be initialized to the
!>          identity matrix.
!>          = 'I':  Initialize A to (a section of) the identity matrix
!>                   before applying U.
!>          = 'N':  No initialization.  Apply U to the input matrix A.
!>
!>          INIT = 'I' may be used to generate square or rectangular
!>          orthogonal matrices:
!>
!>          For M = N and SIDE = 'L' or 'R', the rows will be orthogonal
!>          to each other, as will the columns.
!>
!>          If M < N, SIDE = 'R' produces a dense matrix whose rows are
!>          orthogonal and whose columns are not, while SIDE = 'L'
!>          produces a matrix whose rows are orthogonal, and whose first
!>          M columns are orthogonal, and whose remaining columns are
!>          zero.
!>
!>          If M > N, SIDE = 'L' produces a dense matrix whose columns
!>          are orthogonal and whose rows are not, while SIDE = 'R'
!>          produces a matrix whose columns are orthogonal, and whose
!>          first M rows are orthogonal, and whose remaining rows are
!>          zero.
!>

'I' = start from (a section of) the identity matrix first, 'N' = nope, no init, just apply U to whatever A you handed over. And the 'I' life is lowkey iconic because it lets you generate square or rectangular orthogonal matrices:

  • M = N and SIDE = 'L' or 'R': rows are orthogonal to each other, and so are the columns. balanced. πŸ’–
  • M < N, SIDE = 'R': dense matrix, rows orthogonal, columns not. SIDE = 'L': rows orthogonal, first M columns orthogonal, remaining columns zero.
  • M > N, SIDE = 'L': dense matrix, columns orthogonal, rows not. SIDE = 'R': columns orthogonal, first M rows orthogonal, remaining rows zero.
  • M
!>          M is INTEGER
!>          The number of rows of A.
!>

The rows count, bestie. that's it. that's the parameter. ✨

  • N
!>          N is INTEGER
!>          The number of columns of A.
!>

The columns count. slay. πŸŽ€

  • A
!>          A is REAL array, dimension (LDA, N)
!>          On entry, the array A.
!>          On exit, overwritten by U A ( if SIDE = 'L' ),
!>           or by A U ( if SIDE = 'R' ),
!>           or by U A U' ( if SIDE = 'C' or 'T').
!>

Your actual matrix, dimension (LDA, N). On the way in it's just A; on the way out it's been eaten and replaced by U A (if SIDE = 'L'), or A U (if SIDE = 'R'), or U A U' (if SIDE = 'C' or 'T'). overwrite behaviour, no cap πŸ’€

  • LDA
!>          LDA is INTEGER
!>          The leading dimension of the array A.  LDA >= max(1,M).
!>

Leading dimension of A, and the rule is literally LDA >= max(1,M). don't come for me, that's just the rule. πŸ¦‹

  • ISEED
!>          ISEED is INTEGER array, dimension (4)
!>          On entry ISEED specifies the seed of the random number
!>          generator. The array elements should be between 0 and 4095;
!>          if not they will be reduced mod 4096.  Also, ISEED(4) must
!>          be odd.  The random number generator uses a linear
!>          congruential sequence limited to small integers, and so
!>          should produce machine independent random numbers. The
!>          values of ISEED are changed on exit, and can be used in the
!>          next call to SLAROR to continue the same random number
!>          sequence.
!>

The seed, dimension (4) πŸ’œ On entry it's the seed for the random number generator. Elements should be between 0 and 4095 β€” if they're not, they get reduced mod 4096 (so like, it handles it, but respectfully, keep them in range). Also ISEED(4) must be odd β€” that one's not optional, bestie, that's a hard requirement πŸ™ˆ. The generator uses a linear congruential sequence limited to small integers, so it should produce machine independent random numbers. On exit the values of ISEED are changed, and you can pass them into the next call to SLAROR to continue the same random number sequence β€” continuity, we love to see it ✨

  • X
!>          X is REAL array, dimension (3*MAX( M, N ))
!>          Workspace of length
!>              2*M + N if SIDE = 'L',
!>              2*N + M if SIDE = 'R',
!>              3*N     if SIDE = 'C' or 'T'.
!>

Workspace, dimension (3*MAX( M, N )). How much of it you actually need depends on SIDE:

     2*M + N if SIDE = 'L',
     2*N + M if SIDE = 'R',
     3*N     if SIDE = 'C' or 'T'.
  • INFO
!>          INFO is INTEGER
!>          An error flag.  It is set to:
!>          = 0:  normal return
!>          < 0:  if INFO = -k, the k-th argument had an illegal value
!>          = 1:  if the random numbers generated by SLARND are bad.
!>

The error flag πŸ‘‘ It's set to:

  • = 0: normal return, we ate and left no crumbs
  • < 0: if INFO = -k, the k-th argument had an illegal value (so like, check your args, bestie 😭)
  • = 1: if the random numbers generated by SLARND are bad

⭐ Author

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 145 of file slaror.f. πŸ“


πŸ’€ Author

Generated automatically by Doxygen for LAPACK from the source code. (not a human, no thoughts, just vibes πŸŒ€)


ok that's the whole page bestie, go forth and multiply your matrices by random orthogonal ones responsibly πŸ«ΆπŸ’–

signing off with love: LAPACK, Version 3.12.0 β€” mwah, stan the manual, and remember: this came from /home/abui...N/slaror.f(3) πŸŽ€βœ¨

πŸ“¦ where this page comes from