lis_matrix_scale(3)
πΈ lis_matrix_scale β bestie, let's talk scaling πΈ
okay so this is a page from the Lis Library Functions manual, and it's about one little function that does a whole lot of glow-up work on your matrix. no cap. let's get into it π
β¨ NAME β¨
lis_matrix_scale β scale the matrix π
like. that's it. that's the whole job description. it scales the matrix. iconic behaviour honestly.
π¦ SYNOPSIS π¦
#include "lis.h"
LIS_INT lis_matrix_scale(LIS_MATRIX A, LIS_VECTOR b, LIS_VECTOR d,
LIS_INT action);
so you pull in "lis.h" first, obviously, and then you call it with a matrix, a vector, another vector, and an action that tells it which kind of scaling you want. four arguments, one dream π«Ά
π DESCRIPTION π
Scale matrix A.
that's the description, verbatim, because the original said it in one line and honestly? it ate. it's giving "confident, concise, no notes". you hand it matrix A, you tell it an action, and it comes back with the scaled situation and a vector d holding the diagonal bits it used. periodt β¨
π INPUT π
here's everything you're feeding into this function. buckle up, bestie, there's a lil list π
iβ the row number of the matrixjβ the column number of the matrixvalueβ the scalar value to be assignedAβ the matrix (the main character of this whole operation π)bβ the vectoractionβ the vibe selector, and here are your two options:LIS_SCALE_JACOBIβ Jacobi scaling, which isD^-1 A x = D^-1 b, whereDrepresents the diagonal ofA=(a_ij)LIS_SCALE_SYMM_DIAGβ diagonal scaling, which isD^-1/2 A D^-1/2 x = D^-1/2 b, whereD^-1/2represents the diagonal matrix with(a_ii)^-1/2as the diagonal
so like, pick your fighter: plain Jacobi with the full D^-1, or the symmetric one with the square-root half-power D^-1/2 on both sides. both are valid. both slay. it's your call π
π OUTPUT π
dβ the vector which stores the diagonal elements ofD^-1orD^-1/2
so whichever action you picked, d comes back holding the diagonal elements that got used. that's the lil receipt of what happened to your matrix π§
π EXIT STATUS π
the following exit values are returned:
0β the process is normally terminated (we love a clean exit, no drama π)- unspecified β an error occurred (not specified which error, so likeβ¦ good luck, bestie π)
β SEE ALSO β
go check those out if you want the full Lis lore, iykyk πβ¨
lowkey reminder: this is the Lis Library Functions manual, page lis_matrix_scale(3), and it was dated 28 Aug 2014. yeah, it's an elder but it still serves π
and that's the whole page, bestie β go forth and scale responsibly π¦ππΈ
π¦ where this page comes from
- fedora 43: lis-doc 2.0.21-13.fc41 Β· BSD
- fedora 43: lis-doc 2.1.11-1.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: lis-doc 2.0.21-13.fc41 Β· BSD
- fedora 44: lis-doc 2.1.11-1.fc44 Β· LicenseRef-Callaway-BSD
- nixos 26.05: lis 2.1.10
- nixpkgs unstable: lis 2.1.16
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms