a_star :: PathContext :: cost
# Get cost of a link fun cost(link: L): Int is abstract
redef fun cost(l) do return 1
redef fun cost(l) do return l.weight end
redef fun cost(link) do return link.from.dist_with(link.to)