A type that stores a pair of nodes representing an edge in the graph.
A type that stores a destination node and a weight representing an directed edge in the graph.
We need to define a custom type for these so we can define a hash function on graph edges, in order to more efficiently use them in hashmaps (dictionaries)
We need to define a custom type for these so we can define custom equality on edges.
"""
struct HalfWeightedEdge
a::Int
...
...
@@ -10,7 +10,7 @@ end
"""
Define symmetric edge equality, matches the hash function.
Define edge equality to exclude the weight.
"""
function Base.:(==)(e1::HalfWeightedEdge,e2::HalfWeightedEdge)