From: <hnr...@gr...> - 2012-10-23 20:38:37
|
Hi Cyril, create g as a WeightedGraph and use g.setEdgeWeight(). Regards, Ernst -- Information System on Graph Classes and their Inclusions (ISGCI) http://www.graphclasses.org ----- Reply message ----- From: "Cyril Auburtin" <cyr...@gm...> To: <jgr...@li...> Subject: [jgrapht-users] set edges length Date: Tue, Oct 23, 2012 20:24 I'd like yo know if it's possible to set a defined length for edges, and update it programmatically // add the vertices g.addVertex(amazon); g.addVertex(yahoo); g.addVertex(ebay); // add edges to create linking structure g.addEdge(yahoo, amazon); g.addEdge(yahoo, ebay); for example above, set a third argument to specify the edge length Thx |