有向きコンフィグレーションモデル
import networkx as nx import random as ran #in1=[3,3,3,3,3] #out1=[3,3,3,3,3] def f(x): return int(ran.random()**(-1.0/3.0)) in1=map(f,range(10000)); out1=[] out1[:]=in1[:]; G=nx.directed_configuration_model(in1,out1) for i in G.edges(): print i[0],i[1];