The result of this line is a Traversable that contains the weights of my nodes, but if multiple nodes have the same weight, it will contain the weight only once!
This gives very counter-intuitive beheaviour such as "g.toOuterNodes.map(_.weight).size != g.toOuterNodes.size". To get the result I want, I had to do
g.toOuterNodes.toVector.map(_.weight).
I understand that the nodes of the graph form a set, but since ".toOuterNodes" offers a "Traversable" trait and not a "Set" trait, it would make sense for it
to accept multiple instances of the same object.
val set = Set((1, 2), (1, 3))set map (_._1)
set.toIterator map (_._1)g.nodes.toIterator.map(_.weight)g.nodes.toIterator.map(_.value.weight)