lis_matrix_get_nnz(3)
β¨ lis_matrix_get_nnz β¨
okay bestie, welcome to the Lis Library Functions corner of the manual β this one lives in lis_matrix_get_nnz(3) and it is, and I say this with my whole chest, so useful. π
πΈ NAME πΈ
lis_matrix_get_nnz β bestie, it gets you the number of nonzero elements of the matrix. that's it. that's the whole job. and it does it flawlessly. π
π¦ SYNOPSIS π¦
#include "lis.h"
LIS_INT lis_matrix_get_nnz(LIS_MATRIX A, LIS_INT *nnz);
look at that signature. gorgeous. no notes. β¨
π DESCRIPTION π
Get the number of nonzero elements of matrix A.
like literally that's what it does. you hand it a matrix, it tells you how many of the entries are not zero. no cap. π₯
π«Ά INPUT π«Ά
Aβ the matrix π (yes, the matrix, she's the main character here)
π OUTPUT π
nnzβ the number of nonzero elements π (this is where the answer lands, so make sure you actually pass a pointer to somewhere it can live)
π EXIT STATUS π
the following exit values are returned:
0β the process is normally terminated, everything slayed, no drama πunspecifiedβ an error occurred π like, something went wrong and we're not naming names
β NOTE β
for the multiprocessing environment, this function gets the number of nonzero elements of partial matrix A. so like, heads up β in that setting you're getting the partial picture, not the whole squad. π§
π SEE ALSO π
and that's the whole page, bestie! π this lil' gem is from the Lis Library Functions era, dated 28 Aug 2014, and it was rendered right here on the man page like the icon it is. go forth and count those nonzeros. periodt. ππ πΈ
π¦ 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