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

Support for weighted nodes #92

Closed whilo closed 7 years ago

whilo commented 7 years ago

I have hacked in support for weighted nodes into Prim's algorithm, where the weight is accounted for if a node is supposed to be added. This allows to extend a one-tree towards a TSP approximation.

Sometimes weighted nodes can be achieved by graph transformations into weighted edges as for flow algorithms, but this is not always possible (e.g. for Prim where I do not see this possibility). I would like to know if there is interest in weighted node support? I can add it properly and open a PR, but I thought somebody might have further insight into this...

whilo commented 7 years ago

Well it is possible to transform the edges for my problem, too. So never mind :)