sbromberger / LightGraphs.jl

An optimized graphs package for the Julia programming language
Other
670 stars 185 forks source link

Add a generator for directed configuration model #1553

Open newptcai opened 3 years ago

newptcai commented 3 years ago

LightGraphs now has a generator for the Configuration Model like this

random_configuration_model(n, ks)

which "Create a random undirected graph according to the configuration model containing n vertices, with each node i having degree k[i]".

I would like to implement

random_directed_configuration_model(n, ins, outs)

to generated a directed configuration model, i.e., each a directed graph in which node i has in-degree ins[i] and out-degree outs[i].

This can be implemented by reusing some code in random_configuration_model.

I can write the code and create a PR if you agree to include it in LightGraphs.