You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Reintroduce a method for `percolate_up!``percolate_down!` that doesn't require the element to be passed, which was unintentionally removed in 0.19.2 (JuliaCollections/DataStructures.jl#960).
Copy file name to clipboardExpand all lines: src/heaps/arrays_as_heaps.jl
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Base.@propagate_inbounds function percolate_down!(xs::AbstractArray, i::Integer,
27
27
end
28
28
@inbounds xs[i] = x
29
29
end
30
-
Base.@propagate_inboundspercolate_down!(xs::AbstractArray, i::Integer, o::Ordering, len::Integer=length(xs)) =percolate_down!(xs, i, xs[i], o, len)
30
+
Base.@propagate_inboundspercolate_down!(xs::AbstractArray, i::Integer, o::Ordering=Forward, len::Integer=length(xs)) =percolate_down!(xs, i, xs[i], o, len)
31
31
32
32
33
33
# Binary min-heap percolate up.
@@ -41,7 +41,7 @@ Base.@propagate_inbounds function percolate_up!(xs::AbstractArray, i::Integer, x
41
41
end
42
42
@inbounds xs[i] = x
43
43
end
44
-
Base.@propagate_inboundspercolate_up!(xs::AbstractArray, i::Integer, o::Ordering) =percolate_up!(xs, i, xs[i], o)
44
+
Base.@propagate_inboundspercolate_up!(xs::AbstractArray, i::Integer, o::Ordering=Forward) =percolate_up!(xs, i, xs[i], o)
0 commit comments