Hello guys, I need to test if a value is contained in a MutableBinaryHeap.
I may have the following Tuple t:
6-element Vector{Tuple{Int64, Float64}}:
(1, Inf)
(2, Inf)
(3, Inf)
(4, Inf)
(5, Inf)
(6, Inf)
For the Tuple case I can just do:
a=first.(t)
And check whether a value is contained in a.
The problem is that I need to do this test on a MutableBinaryHeap.
I have the heap h
MutableBinaryHeap((1, 0.0), (2, Inf), (3, Inf), (4, Inf), (5, Inf), (6, Inf))
and doing
c=first.(h)
gives the following error:
ERROR: MethodError: no method matching iterate(::MutableBinaryHeap{Tuple{Int64, Float64}, Base.Order.By{typeof(last), Base.Order.ForwardOrdering}})
Any idea on how to test is a value is contained on the first element of a MutableBinaryHeap?
Thank you so much in advance.