bitwalker / libgraph

A graph data structure library for Elixir projects
MIT License
524 stars 75 forks source link

Graph.edges/3 return empty list for undirected graph #29

Closed robindaumann closed 5 years ago

robindaumann commented 5 years ago

For the following code:

Graph.new(type: :undirected)
|> Graph.add_vertices([:a, :b]) 
|> Graph.add_edge(:a, :b) 
|> Graph.edges(:a, :b)

works as expected [%Graph.Edge{label: nil, v1: :a, v2: :b, weight: 1}] but

Graph.new(type: :undirected) 
|> Graph.add_vertices([:a, :b]) 
|> Graph.add_edge(:a, :b) 
|> Graph.edges(:b, :a)

does return an empty list [].