Heap::Fibonacci(3pm)
π Heap::Fibonacci π
okay bestie so this is Heap::Fibonacci, a User Contributed Perl Documentation page (that's the manual section situation, it's filed as Heap::Fibonacci(3pm)) and honestly? it's giving ⨠elegant⨠algorithm energy, no cap.
πΈ NAME πΈ
Heap::Fibonacci β a fibonacci heap to keep data partially sorted π¦
π SYNOPSIS π
use Heap::Fibonacci;
$heap = Heap::Fibonacci->new;
# see Heap(3) for usage
like, that's it. that's the whole vibe. three lines and you're in π«Ά
β¨ DESCRIPTION β¨
so what does it actually do? It keeps elements in heap order using a linked list of Fibonacci trees. π§ yes, a whole linked list of trees. forest behavior.
and the way it tracks things: the heap method of an element is used to store a reference to the node in the list that refers to the element. so every element literally knows exactly which node in that list is its node. main character energy, truly, everyone gets their own node and their own little back-reference π
See Heap for details on using this module. β that's where the actual how-to-use-it lives, so go read that one too, don't ghost it, iykyk.
π AUTHOR π
John Macdonald, john@perlwolf.com β we love a credited legend β
π COPYRIGHT π
Copyright 1998-2007, O'Reilly & Associates.
This code is distributed under the same copyright terms as perl itself. (translation: same legal rules as perl, periodt. don't be weird about it. π)
π SEE ALSO π
Heap(3)β the main usage guide, your first stop fr frHeap::Elem(3)β the element side of the story
lowkey the whole point is partially sorted data β it doesn't fully sort anything for you, it just keeps the heap order together. setting expectations correctly is self-care. π
and that's the page!! π this was perl v5.36.0, dated 2022-10-22, filed under Heap::Fibonacci(3pm) β slay, go build a forest of Fibonacci trees bestie, you got this πβ¨
π¦ where this page comes from
- ubuntu noble: libheap-perl 0.80-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libheap-perl 0.80-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libheap-perl 0.80-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms