[jgrapht-users] Edge weights
Brought to you by:
barak_naveh,
perfecthash
From: <fee...@gm...> - 2015-07-01 22:02:56
|
Hi there, I’m a newbie using Jgrapht… .My problem has to do with a large weighted graph (about 2000 edges) and the assignation of its weights. All I wanna ask is whether or not weights for a graph can be assigned dynamically (a loop) rather than static (one by on)...like: DefaultWeightedEdge e1 = graph.addEdge("vertex1", "vertex2”); graph.setEdgeWeight(e1, 5); (I’d have to write this thousand times…. ) Thanks. Phil |