lis_matrix_duplicate(3)

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

πŸ’– lis_matrix_duplicate β€” aka "duplicate the matrix" ✨

okay bestie, welcome to the lis_matrix_duplicate(3) page from the Lis Library Functions crew 🫢 this is the one where you clone a matrix's whole setup without dragging all its little numbers along. sit down, grab a strawberry πŸ“, let's get into it.


🌈 SYNOPSIS 🌈

#include "lis.h"

LIS_INT lis_matrix_duplicate(MATRIX *Ain, LIS_MATRIX *Aout);

that's the whole vibe. two args, one dream πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

so what this does is: it creates matrix Aout which has the same information as Ain. like, same structure, same everything, no cap. it's giving twin energy, it's giving "she's literally me" πŸ’€βœ¨


🌸 INPUT 🌸

  • Ain β€” the source matrix. the original. the blueprint. the main character πŸ‘‘

πŸ¦‹ OUTPUT πŸ¦‹

  • Aout β€” the destination matrix. the freshly-born clone, standing there with the same info and a whole lot of potential πŸŽ€

⭐ EXIT STATUS ⭐

here's what you get back, queen:

  • 0 β€” the process is normally terminated. slay, we ate, no notes πŸ”₯
  • unspecified β€” an error occurred. not the vibe. crying. 😭

⚠️ NOTE ⚠️

okay this part is SO important, listen up, don't skip it, i'm being fr fr:

lis_matrix_duplicate does not copy the elements of the matrix β€” it only allocates the memory. it's giving empty-but-shaped, it's giving structure with no substance πŸ™ˆ

so if you actually want the values too? you gotta call lis_matrix_copy after this function. do both, in that order, or you'll be sitting there wondering why your numbers ghosted you πŸ’€


πŸ’œ SEE ALSO πŸ’œ


kisses from the Lis Library Functions era πŸ’– this page was written on 6 Sep 2012, and yeah, she's still serving after all this time β€” Man Page energy, lowkey timeless, highkey legendary. periodt. πŸ’…

πŸ“¦ where this page comes from