[jgrapht-users] RandomGraphGenerator
Brought to you by:
barak_naveh,
perfecthash
From: <ftu...@4c...> - 2012-04-16 22:54:39
|
Hi, I am trying to use RandomGraphGenerator to generate random graphs as provided by the generate method. I use the following snippet to generate a random graph but it seems like it enters to an infinite loop. RandomGraphGenerator<MyVertex,MyEdge> rgg = new RandomGraphGenerator<MyVertex,MyEdge>(aNumOfVertices, aNumOfEdges); DirectedGraph<MyVertex,MyEdge> graph = new DefaultDirectedGraph<MyVertex, MyEdge>(MyEdge.class); MyVertexFactory dfvf = new MyVertexFactory(); Map<String,MyVertex> resultMap = new HashMap<String,MyVertex>(); rgg.generateGraph(graph,dfvf,resultMap); I am going to check the code of RandomGraphGenerator tomorrow to understand how it works but I would really appreciate your early suggestions on the matter. Thanks. -- Fatih. |