Open ghost opened 5 years ago
Use the method setAttribute() You can see an example here : https://github.com/graphstream/gs-algo/blob/master/src-test/org/graphstream/algorithm/test/TestDijkstra.java
@hichbra Thanks. I saw that and ended up using it, but was just wondering- why doesn't the AddEdge()
method have an option for weight initself? Rather then having to use an attribute for it.
I want to add weights to these edges, so I can test my algorithm for shortest path between nodes. I don't see a option to add weight in
graph.addEdge()
, is there a way to add weights to the graph and display them?