I'm currently implementing a configuration model for an unweighted, directed graph where the algorithm will avoid multiple edges and self-loops. Please let me know if this already exists.
I'm using triad.census() to test this, as it is my understanding that if every node keeps its in- and out-degrees constant, then (1) the degree distributions will remain the same, and (2) the number of isolates will also remain the same. As such, running a triad.census() on the original graph and a random configuration model based on the original graph should yield the same count for the 003 triad.
Am I correct in assuming this? When I actually perform the above, I get different results for the random and observed graphs. The in- and out-degree distributions are the same, and in fact, every node (based on its numeric id) has the same in and out degrees... Yet the triad census an empty graph of size 3 changes... So I'm not sure if it's my logic or if I don't quite understand how igraph works.
Any help would be appreciated. Some output is below (I'm using R):
> # g is the observed graph, gr is the graph based on the configuration model.
> summary(g) Vertices: 16738 Edges: 101905 Directed: TRUE