SbHeapFuncs(3)

πŸ“¦ version 3.1.3, in fedora 43, fedora 44

πŸ’– SbHeapFuncs β€” NAME πŸ’–

okay so SbHeapFuncs is this little struct, and its whole personality is: it holds the functions you use to tell a heap how to deal with its elements. that's it, that's the vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <Inventor/SbHeap.h>

🌸 Public Attributes 🌸

float(* eval_func )(void *)
int(* get_index_func )(void *)
void(* set_index_func )(void *, int)

πŸ‘‘ Detailed Description πŸ‘‘

bestie, the SbHeapFuncs struct is literally just there to let you specify the functions that operate on heap elements. like, it's a little bundle of callbacks and it serves cunt. πŸ’…


πŸŽ€ Member Data Documentation πŸŽ€

⭐ float(* SbHeapFuncs::eval_func) (void *)

so eval_func is a pointer to a function that's supposed to hand back a weight-value for a heap element. and the way this works? the smaller elements get extracted from the heap first. smallest first, periodt. πŸ“

πŸ”₯ int(* SbHeapFuncs::get_index_func) (void *)

get_index_func is a pointer to a function that should return the element's heap index. now listen, this one's important: if you wanna remove an element from the heap (and not just the first element, like a coward), or if you wanna change the weight of a heap element, then you must supply both of the index functions. and every single element has to store its own heap index inside its own data structures. no shortcuts, iykyk. πŸ’€

🌈 void(* SbHeapFuncs::set_index_func) (void *, int)

set_index_func is the one that actually sets that index value, and it gets called every time the element gets moved around in the heap. so like, it's keeping the receipts updated in real time. obsessed. 🫢


✨ Author ✨

generated automatically by Doxygen for Coin, straight from the source code. not me writing my own bio, it literally did that itself 😭


okay that's the whole page, bestie, you're welcome πŸ’–

Coin, Version 3.1.3 β€” mwah, that's the version and the source, catch you on the next manpage, slay πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from