bheap
Binomial heap in Elixir
Install
In your mix.exs:
defp deps do
[
{:bheap, "~> 1.0.0"}
]
end
Then run mix deps.get.
API
Documentation is available in HexDocs.
BHeap.new/0, BHeap.new/1
Creates a new empty heap. When given an enumerable, it will populate the new heap with it.
BHeap.put/2
Puts a new value in a heap.
BHeap.min/1
Returns the minimum element of a heap.
BHeap.remove_min/1
Removes the minimum element from a heap.
BHeap.merge/2
Merges two heaps.
BHeap.sort/1
Sorts the given heap and returns a list.
License
MIT © Juan Soto