Hi,

I'm using graph-tool to try to generate random graphs with a sequence of degrees. For example, in a 3-node graph, I generated a random graph with all nodes with input degrees 1 and output degrees 1.

My code:

>>> import graph_tool.all as gt

>>> def deg_sampler():
...     	return 1,1
... 
>>> g = gt.random_graph(3,deg_sampler,parallel_edges=True, self_loops=False)

>>> gt.graph_draw(g)

Can I generate a random graph defining the input and output degrees of each node? For example, tree nodes with respectively the input degrees (1, 2, 0) and output degrees (1, 0, 2).

Thanks,

Alvaro