SRC/slasy2.f(3)

πŸ’… SRC/slasy2.f(3) πŸ’…

Okay so bestie, welcome to the Library Functions Manual β€” this whole page is about SRC/slasy2.f, and honestly? It's giving main character energy. Let's get into it. 🫢


✨ NAME ✨

SRC/slasy2.f β€” that's the file, and it's literally the blueprint for solving a Sylvester matrix equation when the matrices are tiny (order 1 or 2). No cap. πŸŽ€


🌸 SYNOPSIS 🌸

Functions/Subroutines

Here's the serve:

subroutine slasy2 (ltranl, ltranr, isgn, n1, n2, tl, ldtl, tr, ldtr, b,
    ldb, scale, x, ldx, xnorm, info)

And what does it do? SLASY2 solves the Sylvester matrix equation where the matrices are of order 1 or 2. Periodt. πŸ”₯


πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

Okay so here's the full signature β€” read it and weep (with joy):

subroutine slasy2 (logical ltranl, logical ltranr, integer isgn, integer n1,
    integer n2, real, dimension( ldtl, * ) tl, integer ldtl, real,
    dimension( ldtr, * ) tr, integer ldtr, real, dimension( ldb, * ) b,
    integer ldb, real scale, real, dimension( ldx, * ) x, integer ldx, real
    xnorm, integer info)

SLASY2 solves the Sylvester matrix equation where the matrices are of order 1 or 2. (Yes, I said it again. It's iconic. πŸ’…)

Purpose:

Straight from the source, no edits:

!>
!> SLASY2 solves for the N1 by N2 matrix X, 1 <= N1,N2 <= 2, in
!>
!>        op(TL)*X + ISGN*X*op(TR) = SCALE*B,
!>
!> where TL is N1 by N1, TR is N2 by N2, B is N1 by N2, and ISGN = 1 or
!> -1.  op(T) = T or T**T, where T**T denotes the transpose of T.
!>

Like, it's literally solving a tiny little matrix equation. So cute. 🧚

Parameters

Every single one, bestie. No skipping. πŸ’–

  • LTRANL β€” LTRANL is LOGICAL. On entry, LTRANL specifies the op(TL):
    • = .FALSE., op(TL) = TL
    • = .TRUE., op(TL) = TL**T
  • LTRANR β€” LTRANR is LOGICAL. On entry, LTRANR specifies the op(TR):
    • = .FALSE., op(TR) = TR
    • = .TRUE., op(TR) = TR**T
  • ISGN β€” ISGN is INTEGER. On entry, ISGN specifies the sign of the equation as described before. ISGN may only be 1 or -1. 🚦
  • N1 β€” N1 is INTEGER. On entry, N1 specifies the order of matrix TL. N1 may only be 0, 1 or 2. (Tiny matrices only. We don't do big here. πŸ™ˆ)
  • N2 β€” N2 is INTEGER. On entry, N2 specifies the order of matrix TR. N2 may only be 0, 1 or 2.
  • TL β€” TL is REAL array, dimension (LDTL,2). On entry, TL contains an N1 by N1 matrix.
  • LDTL β€” LDTL is INTEGER. The leading dimension of the matrix TL. LDTL >= max(1,N1). ⚠️
  • TR β€” TR is REAL array, dimension (LDTR,2). On entry, TR contains an N2 by N2 matrix.
  • LDTR β€” LDTR is INTEGER. The leading dimension of the matrix TR. LDTR >= max(1,N2). ⚠️
  • B β€” B is REAL array, dimension (LDB,2). On entry, the N1 by N2 matrix B contains the right-hand side of the equation. πŸ’Œ
  • LDB β€” LDB is INTEGER. The leading dimension of the matrix B. LDB >= max(1,N1). ⚠️
  • SCALE β€” SCALE is REAL. On exit, SCALE contains the scale factor. SCALE is chosen less than or equal to 1 to prevent the solution overflowing. (Safety first, bestie. πŸ›Ÿ)
  • X β€” X is REAL array, dimension (LDX,2). On exit, X contains the N1 by N2 solution. That's the whole point! 🎯
  • LDX β€” LDX is INTEGER. The leading dimension of the matrix X. LDX >= max(1,N1). ⚠️
  • XNORM β€” XNORM is REAL. On exit, XNORM is the infinity-norm of the solution. (Fancy math flex. πŸ‘‘)
  • INFO β€” INFO is INTEGER. On exit, INFO is set to:
    • 0: successful exit. πŸŽ‰
    • 1: TL and TR have too close eigenvalues, so TL or TR is perturbed to get a nonsingular equation. 😬
NOTE: In the interests of speed, this routine does not check the inputs for errors. 🚨 Like, it's fast and loose. You've been warned.

Author

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

Definition at line 172 of file slasy2.f. πŸ“


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for LAPACK from the source code. (The robots did this one. πŸ€–)


And that's the whole vibe, bestie. This masterpiece is from LAPACK Version 3.12.0, file SRC/slasy2.f(3). Bye! πŸ’–βœ¨

πŸ“¦ where this page comes from