SLACN2(3)

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

πŸŽ€ SLACN2(3) β€” the girlies are estimating 1-norms πŸ’…

okay so first things first, the manual name is LAPACK and this whole page lives at

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/slacn2.f

which is literally the source file, bestie. it's a library function, it's giving Fortran, it's giving ✨numerical linear algebra✨. buckle up πŸ¦‹


✨ NAME ✨

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/SRC/slacn2.f

yes the NAME section is just the file path, no I'm not joking, that's what Doxygen does and we respect the grind πŸ™ˆ


🌸 SYNOPSIS 🌸

Functions/Subroutines

subroutine SLACN2 (n, v, x, isgn, est, kase, isave)

okay so what does she do? SLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products. that's the whole vibe. no cap πŸ”₯


πŸ‘‘ Function/Subroutine Documentation πŸ‘‘

subroutine SLACN2 (integer n, real, dimension( * ) v, real, dimension( * ) x, integer, dimension( * ) isgn, real est, integer kase, integer, dimension( 3 ) isave)

SLACN2 estimates the 1-norm of a square matrix, using reverse communication for evaluating matrix-vector products. periods, slay πŸ’…

🧚 Purpose:

!>
!> SLACN2 estimates the 1-norm of a square, real matrix A.
!> Reverse communication is used for evaluating matrix-vector products.
!>

so it's a square, real matrix A, and reverse communication means you do the matrix-vector products and she just tells you what to multiply. teamwork, bestie 🫢


πŸ“ Parameters

  • N β€” N is INTEGER. the order of the matrix. N >= 1. (so like, at least one, she's not doing zero-sized anything, don't even try 😭)
!>          N is INTEGER
!>         The order of the matrix.  N >= 1.
!>
  • V β€” V is REAL array, dimension (N). on the final return, V = A*W, where EST = norm(V)/norm(W) β€” and heads up, W is not returned. she keeps her secrets 🀫
!>          V is REAL array, dimension (N)
!>         On the final return, V = A*W,  where  EST = norm(V)/norm(W)
!>         (W is not returned).
!>
  • X β€” X is REAL array, dimension (N). on an intermediate return, you gotta overwrite X with:
    • A * X, if KASE=1,
    • A**T * X, if KASE=2,

and then SLACN2 must be re-called with all the other parameters unchanged. like, don't touch anything else, just X. got it? πŸ’–

!>          X is REAL array, dimension (N)
!>         On an intermediate return, X should be overwritten by
!>               A * X,   if KASE=1,
!>               A**T * X,  if KASE=2,
!>         and SLACN2 must be re-called with all the other parameters
!>         unchanged.
!>
  • ISGN β€” ISGN is INTEGER array, dimension (N). that's it. that's the whole description. iconic minimalism πŸ’€
!>          ISGN is INTEGER array, dimension (N)
!>
  • EST β€” EST is REAL. on entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be unchanged from the previous call to SLACN2. on exit, EST is an estimate (a lower bound) for norm(A). lower bound bestie, it's not gonna overpromise 😌
!>          EST is REAL
!>         On entry with KASE = 1 or 2 and ISAVE(1) = 3, EST should be
!>         unchanged from the previous call to SLACN2.
!>         On exit, EST is an estimate (a lower bound) for norm(A).
!>
  • KASE β€” KASE is INTEGER.
    • initial call to SLACN2: KASE should be 0.
    • intermediate return: KASE will be 1 or 2, telling you whether X should be overwritten by A * X or A**T * X.
    • final return from SLACN2: KASE will again be 0.

so it starts at 0, does its little 1/2 dance, then goes back to 0. full circle moment 🌈

!>          KASE is INTEGER
!>         On the initial call to SLACN2, KASE should be 0.
!>         On an intermediate return, KASE will be 1 or 2, indicating
!>         whether X should be overwritten by A * X  or A**T * X.
!>         On the final return from SLACN2, KASE will again be 0.
!>
  • ISAVE β€” ISAVE is INTEGER array, dimension (3). used to save variables between calls to SLACN2. she's the memory keeper, the main character of state persistence πŸ‘‘
!>          ISAVE is INTEGER array, dimension (3)
!>         ISAVE is used to save variables between calls to SLACN2
!>

πŸ’œ Author

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

the whole squad co-signed this one 🫢


πŸ”₯ Further Details:

!>
!>  Originally named SONEST, dated March 16, 1988.
!>
!>  This is a thread safe version of SLACON, which uses the array ISAVE
!>  in place of a SAVE statement, as follows:
!>
!>     SLACON     SLACN2
!>      JUMP     ISAVE(1)
!>      J        ISAVE(2)
!>      ITER     ISAVE(3)
!>

so she used to go by SONEST, dated March 16, 1988 β€” retro icon, vintage queen πŸŽ€ β€” and this is the thread safe version of SLACON, which swaps out a SAVE statement for the ISAVE array. the mapping is:

  • JUMP β†’ ISAVE(1)
  • J β†’ ISAVE(2)
  • ITER β†’ ISAVE(3)

thread safety is so important bestie, SAVE statements are not it in parallel code 😭


🌟 Contributors:

Nick Higham, University of Manchester πŸ’–


πŸ“š References:

N.J. Higham, "FORTRAN codes for estimating the one-norm ofa real or complex matrix, with applications to condition estimation", ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988.

(and yes, ofa is glued together exactly like that in the original, I don't make the rules, I just preserve them faithfully πŸ™ˆ)


Definition at line 135 of file slacn2.f. ✨


πŸ¦‹ Author (the meta one)

Generated automatically by Doxygen for LAPACK from the source code. no human wrote this page, a robot did, and honestly? she ate πŸ€–πŸ’…


okay that's the whole page!! go estimate some norms bestie, you got this ⭐🌈

β€” LAPACK, Version 3.12.0, signing off from /home/abui...RC/slacn2.f(3) πŸŽ€βœ¨

πŸ“¦ where this page comes from