@@ -149,16 +149,16 @@ function _edit_distance(
149149 # initialize open set
150150 OPEN = PriorityQueue {Vector{Tuple},Float64} ()
151151 for v in vertices (G₂)
152- enqueue ! (OPEN, [(T (1 ), v)], vertex_subst_cost (1 , v) + h ([(T (1 ), v)]))
152+ push ! (OPEN, [(T (1 ), v)] => vertex_subst_cost (1 , v) + h ([(T (1 ), v)]))
153153 end
154- enqueue ! (OPEN, [(T (1 ), U (0 ))], vertex_delete_cost (1 ) + h ([(T (1 ), U (0 ))]))
154+ push ! (OPEN, [(T (1 ), U (0 ))] => vertex_delete_cost (1 ) + h ([(T (1 ), U (0 ))]))
155155
156156 c = 0
157157 while true
158158 # minimum (partial) edit path
159- λ, cost = peek (OPEN)
159+ λ, cost = first (OPEN)
160160 c += 1
161- dequeue ! (OPEN)
161+ popfirst ! (OPEN)
162162
163163 if is_complete_path (λ, G₁, G₂)
164164 return cost, λ
@@ -177,7 +177,7 @@ function _edit_distance(
177177 end
178178 new_cost += association_cost (u1, u1, v1, v1) # handle self-loops
179179
180- enqueue ! (OPEN, λ⁺, new_cost)
180+ push ! (OPEN, λ⁺ => new_cost)
181181 end
182182 # we try deleting v1
183183 λ⁺ = [λ; (u1, U (0 ))]
@@ -194,7 +194,7 @@ function _edit_distance(
194194 new_cost += edge_delete_cost (Edge (u2, u1))
195195 end
196196 end
197- enqueue ! (OPEN, λ⁺, new_cost)
197+ push ! (OPEN, λ⁺ => new_cost)
198198 else
199199 # add remaining vertices of G₂ to the path by deleting them
200200 λ⁺ = [λ; [(T (0 ), v) for v in vs]]
0 commit comments