aysylu / loom

Graph library for Clojure. Mailing list https://groups.google.com/forum/#!forum/loom-clj
http://aysy.lu/loom/
886 stars 108 forks source link

loom.io/view logic errors #133

Closed simongray closed 3 years ago

simongray commented 3 years ago

I have made a companion PR that fixes this issue: https://github.com/aysylu/loom/pull/132

The current implementation of loom.io/dot-str does not respect the Edge protocol and uses destructuring to get the src and dest, which makes having the Edge protocol fairly pointless. This results in graphs not being able to be be viewed at all unless they can be destructured sequentially like a Clojure data structure.

Furthermore, the current implementation of loom.io/dots-tr also complects the labels of nodes and their identities. This results in wrong graphs being drawn by loom.io/view, since the algorithm assumes that a node's label is the same as the node's ID. Any graph that has similar labels for different nodes will have these nodes merged when displayed using loom.io/view which is a pretty terrible outcome if you trust the algorithm to work correctly.

simongray commented 3 years ago

This seems to have been fixed with the merge of my PR.