snowleopard / alga

Algebraic graphs
MIT License
715 stars 68 forks source link

Algebra.Graph.Labelled.AdjacencyMap.edges appears to be broken #301

Closed bgamari closed 1 year ago

bgamari commented 1 year ago

AdjacencyMap.edges appears not to introduce any edges:

λ> import Algebra.Graph.Labelled.AdjacencyMap
λ> a = AdjMap.edges [((), 'a','b')]
λ> AdjMap.edgeList a
[]
λ> AdjMap.adjacencyMap a
fromList [('a',fromList []),('b',fromList [])]
bgamari commented 1 year ago

Ahh, never mind; I now see that "zero"-annotated (e.g. ()) edges are trimmed from the graph.

snowleopard commented 1 year ago

Yeah, I guess the case with e = () can be pretty confusing since it yields a set rather than a graph.