DORT01(3)

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

πŸ’… DORT01(3) β€” like, the Library Functions Manual one, bestie ✨

okay so picture this: you're deep in the LAPACK testing directory, right? and you need to know if a matrix is actually orthogonal or just pretending. that's literally this whole file. welcome to the group chat 🫢


🌸 NAME 🌸

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/TESTING/EIG/dort01.f

(yeah that's the whole name, she's got a lot going on β€” a full path as a NAME, main character energy fr πŸ’€)


✨ SYNOPSIS ✨

πŸ¦‹ Functions/Subroutines

subroutine DORT01 (rowcol, m, n, u, ldu, work, lwork, resid)
    DORT01

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

subroutine DORT01 (character rowcol, integer m, integer n, double precision,
    dimension( ldu, * ) u, integer ldu, double precision, dimension( * )
    work, integer lwork, double precision resid)
DORT01

πŸŽ€ Purpose:

!>
!> DORT01 checks that the matrix U is orthogonal by computing the ratio
!>
!>    RESID = norm( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
!> or
!>    RESID = norm( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
!>
!> Alternatively, if there isn't sufficient workspace to form
!> I - U*U' or I - U'*U, the ratio is computed as
!>
!>    RESID = abs( I - U*U' ) / ( n * EPS ), if ROWCOL = 'R',
!> or
!>    RESID = abs( I - U'*U ) / ( m * EPS ), if ROWCOL = 'C'.
!>
!> where EPS is the machine precision.  ROWCOL is used only if m = n;
!> if m > n, ROWCOL is assumed to be 'C', and if m < n, ROWCOL is
!> assumed to be 'R'.
!>

so basically: she builds I - U*U' (or I - U'*U), takes the norm, divides by n * EPS (or m * EPS), and that's your RESID. if the workspace can't even fit that, she doesn't fold, she just switches to abs(...) instead of norm(...) β€” not me relating πŸ™ˆ. and ROWCOL only gets a say when m = n; if m > n it's assumed 'C', if m < n it's assumed 'R'. iykyk πŸ’œ


🌈 Parameters 🌈

  • ROWCOL β€” CHARACTER. this is the vibe check: it says whether we're checking the rows or the columns of U for orthogonality. queen only matters if M = N. options are literally:
    • = 'R': check for orthogonal rows of U πŸ“
    • = 'C': check for orthogonal columns of U 🧚
  • M β€” INTEGER. the number of rows of the matrix U. periodt.
  • N β€” INTEGER. the number of columns of the matrix U. also periodt.
  • U β€” DOUBLE PRECISION array, dimension (LDU,N). it's the orthogonal matrix U herself πŸ‘‘. her columns get checked if m > n, or if m = n and ROWCOL = 'C'. her rows get checked if m < n, or if m = n and ROWCOL = 'R'. no cap.
  • LDU β€” INTEGER. the leading dimension of the array U. must be LDU >= max(1,M) β€” that's a hard requirement, don't play with it πŸ’€
  • WORK β€” DOUBLE PRECISION array, dimension (LWORK). that's it, that's the whole description 😭
  • LWORK β€” INTEGER. the length of the array WORK. for best performance (✨ slay ✨), LWORK should be at least N*(N+1) if ROWCOL = 'C', or M*(M+1) if ROWCOL = 'R' β€” but here's the iconic part: the test will be done even if LWORK is 0. she's gonna compute regardless, bestie.
  • RESID β€” DOUBLE PRECISION. this is the whole point:
    • RESID = norm( I - U * U' ) / ( n * EPS ), if ROWCOL = 'R', or
    • RESID = norm( I - U' * U ) / ( m * EPS ), if ROWCOL = 'C'.

πŸ’– Author πŸ’–

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

(give it up for the founding mothers and fathers of this math 🫢)

Definition at line 115 of file dort01.f. πŸ“


⭐ Author ⭐

Generated automatically by Doxygen for LAPACK from the source code. (yes the manpage has two Author sections, and honestly? she's allowed. range 🌈)


and that's the whole page!! go forth and check that orthogonality, bestie πŸ’…

pinkies-up sign-off from LAPACK, Version 3.12.0, dated /home/abui...IG/dort01.f(3) β€” see u in the next manpage, mwah πŸ’œπŸŽ€

πŸ“¦ where this page comes from