DegreeGraphDistribution
supports directed graphs because it has a DirectedEdges
option.
How can I specify the in-degree sequence and the out-degree sequence separately when generating random directed graphs?
For example,
RandomGraph@DegreeGraphDistribution[{2, 2, 1, 1}, DirectedEdges -> True]
gives a graph where the vertices have the following {in, out} degree combinations: {{2,2}, {2,2}, {1,1}, {1,1}}
. This syntax worked, but the in and out-degree sequences are identical for each vertex. How can I specify them separately?
I'd like to note that as a workaround it is possible to use igraph's degree.sequence.game
function through the IGraphR package. However, now I am looking to do this in pure Mathematica though. If you do end up using igraph, be sure to read the documentation in detail, and be aware of the quirks of each method that is available (does it guarantee uniform sampling? does it produce simple graphs? does it support directed graphs? there are several options).