-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Description
I am trying to use the example in the DataStructures documentation. The code is the following:
using DataStructures data = collect(enumerate(["foo", "bar", "baz"])) h2 = BinaryHeap(Base.By(last), data) # Order by 2nd element only first(h2) # => (2, "bar")
I am getting the following error:
ERROR: MethodError: no method matching BinaryHeap(::Base.Order.By{typeof(last), Base.Order.ForwardOrdering}, ::Vector{Tuple{Int64, String}}) Stacktrace: [1] top-level scope @ ~/Desktop/ShortestPath/heaptest.jl:3
Which is weird because I have been using Mutable Binary Heaps for a long time (using also the ordering) and I never had any problem. I have not updated Julia, and I have the latest version of Data Structures. Any ideas?
Metadata
Metadata
Assignees
Labels
No labels