Heap::Binary(3pm)

πŸ’– Heap::Binary β€” a binary heap bestie πŸ’–

okay so this is Heap::Binary, a Perl module from the Heap family, and it's literally just a binary heap to keep your data partially sorted ✨ it lives at Heap::Binary(3pm) in the User Contributed Perl Documentation, and honestly? iconic.


🌸 SYNOPSIS 🌸

use Heap::Binary;

$heap = Heap::Binary->new;
# see Heap(3) for usage
bestie, fr fr, the real usage deets live over in Heap(3) β€” this page is just the Heap::Binary glow-up πŸ’…

🫢 DESCRIPTION 🫢

So what does it do?? It keeps an array of elements in heap order πŸŽ€ β€” that's the whole vibe.

And the way that works: the heap method of an element is used to store the index into the array that refers to the element πŸ‘‘ so each element lowkey knows where it sits in the lineup.

For all the actual how-to-use-it details, go read Heap β€” that's the main character here, we're just the sibling 🌈


✨ AUTHOR ✨

John Macdonald, john@perlwolf.com πŸ’Œ


Copyright 1998-2007, O'Reilly & Associates.

This code is distributed under the same copyright terms as perl itself β€” no cap 🫑


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the tea πŸ“ this page is from perl v5.36.0, dated 2022-10-22, filed under Heap::Binary(3pm) β€” go forth and heap, bestie, you got this πŸ’œπŸ’…

πŸ“¦ where this page comes from