We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like an empty! method for all heap types. It is currently only defined for BinaryMinMaxHeap.
empty!
BinaryMinMaxHeap
Compared to using extract_all!, an empty! method would not allocate a vector, which might be important for performance oriented applications.
extract_all!
Maybe an implementation could look like this:
function Base.empty!(h::AbstractHeap) while !isempty(h) pop!(h) end h end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I would like an
empty!
method for all heap types. It is currently only defined forBinaryMinMaxHeap
.Compared to using
extract_all!
, anempty!
method would not allocate a vector, which might be important for performance oriented applications.Maybe an implementation could look like this:
The text was updated successfully, but these errors were encountered: