lis_matrix_set_type(3)

πŸ“¦ version 2.1.11, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’… lis_matrix_set_type(3) β€” the one where you pick your matrix's whole storage vibe

okay bestie, sit down, we're doing Lis Library Functions and this page is literally called lis_matrix_set_type(3). it's giving "choose your own adventure but the adventure is memory layout" ✨


🌸 NAME 🌸

lis_matrix_set_type β€” assign the storage format πŸŽ€


✨ SYNOPSIS ✨

#include "lis.h"

LIS_INT lis_matrix_set_type(LIS_MATRIX A, LIS_INT matrix_type);

like. that's it. one call. she's small but she's powerful πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

Assign the storage format. yes queen, you heard her β€” you're telling the matrix A which storage format she's gonna live in from now on. it's a whole glow-up for your data structure and honestly? iconic πŸ‘‘


πŸ’œ INPUT πŸ’œ

  • A β€” The matrix. your girl. the one getting the makeover.
  • matrix_type β€” The storage format. the aesthetic you're committing to.

🌈 OUTPUT 🌈

nothing, bestie. this function doesn't hand you anything back. it just... does the thing. lowkey mysterious of her 😭


πŸ”₯ EXIT STATUS πŸ”₯

The following exit values are returned:

  • 0 β€” The process is normally terminated. slay, we love a clean exit πŸ’–
  • unspecified β€” An error occurred. not the vibe. not the vibe at all πŸ’€

🫢 NOTE 🫢

no cap, this part matters: matrix_type of A is LIS_MATRIX_CSR when the matrix is created. so she starts as CSR by default. that's just her factory setting, periodt.

here's every storage format you can set her to (the table below shows the available storage formats for matrix_type β€” and yes, CSR shows up twice in the original, so I'm keeping it twice, I don't make the rules):

  • Compressed Sparse Row (CSR) β€” {LIS_MATRIX_CSR|1}
  • Compressed Sparse Row (CSR) β€” {LIS_MATRIX_CSR|1}
  • Compressed Sparse Column (CSC) β€” {LIS_MATRIX_CSC|2}
  • Modified Compressed Sparse Row (MSR) β€” {LIS_MATRIX_MSR|3}
  • Diagonal (DIA) β€” {LIS_MATRIX_DIA|4}
  • Ellpack-Itpack Generalized Diagonal (ELL) β€” {LIS_MATRIX_ELL|5}
  • Jagged Diagonal (JAD) β€” {LIS_MATRIX_JAD|6}
  • Block Sparse Row (BSR) β€” {LIS_MATRIX_BSR|7}
  • Block Sparse Column (BSC) β€” {LIS_MATRIX_BSC|8}
  • Variable Block Row (VBR) β€” {LIS_MATRIX_VBR|9}
  • Coordinate (COO) β€” {LIS_MATRIX_COO|10}
  • Dense (DNS) β€” {LIS_MATRIX_DNS|11}

twelve entries, eleven formats, one duplicate, zero notes. that's the whole menu, bestie β€” pick your fighter πŸŽ€


πŸ‘‘ SEE ALSO πŸ‘‘


okay that's the whole page, go forth and set your types responsibly. this has been Lis Library Functions, dated 6 Sep 2012, living in the man page files as lis_matrix_set_type(3). mwah, bye bestie πŸ¦‹πŸ’–βœ¨

πŸ“¦ where this page comes from