I am using random_graph() to generate graphs for given marginals. This seems
to work well if the method does not need to create too many parallel edges.
However, as soon as the marginals are significantly larger then the number
of vertices the function tends to crash/hang up python. Here is a small
example:

>>> import graph_tool.all as gt
>>> in_degr =[50,40,3]
>>> out_degr=[40,3,50]
>>> g = gt.random_graph(3, lambda i: (in_degr[i],out_degr[i]),
>>> directed=True,parallel_edges=True)

I tried this on OS X and Linux with similar results. I'm not sure I have the
right approach here. I'd rather prefer to have weighted edges created then
parallel edges. But I couldn't figure out how to do that. I have two
questions:

1. Can anyone reproduce / solve the issue above? 
2. Is there a way to generate directed graphs from marginals with weighted
edges?

Thanks,
Olaf



--
View this message in context: 
http://main-discussion-list-for-the-graph-tool-project.982480.n3.nabble.com/random-graph-function-crashes-python-tp4026136.html
Sent from the Main discussion list for the graph-tool project mailing list 
archive at Nabble.com.
_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to