How to add two edges having the same label but different endpoints?
For example, I want to add two edges having the same label 'label1', one from vertex v-1 to vertex v-2 and the other one from vertex v-2 to v-3.
Part of the code would be:
g.addEdge("label1","v-1","v-2");
g.addEdge("label1","v-2","v-3");
But JUNG does not allow to add two edges with the same label. It gives an error:
edge label1 already exists in this graph with endpoints [v-1, v-2] and cannot be added with endpoints [v-2, v-3]
How can I add two edges having the same label?
Thanks.
Edit:
I just read that there is a way to assign a weight value to an edge, that is by using EdgeWeightLabeller, but these weight values should be integers. So it does not seem to solve the problem.
"label1 "
– CreepervertexLabelTransformer()
to displays the name part of the class instance, but use the unique id for searching, etc. – Cheongsam