igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Generate bipartite graph with specified degree distribution


From: Gábor Csárdi
Subject: Re: [igraph] Generate bipartite graph with specified degree distribution [Again]
Date: Fri, 17 May 2013 23:37:42 -0400

Hi,

On Fri, May 17, 2013 at 7:40 PM, Caio Santos <address@hidden> wrote:
Hi, 

I saw a discussion about this, but i couldn't make it work.
Sugestion:
"In out_deg, the first n1 values should be the
degrees of the vertices in the first bucket, the next n2 values will
be zero. In in_deg, the first n1 values will be zero, the next n2
values will be the degrees of the vertices in the second bucket."

I tried this in R:
g <- degree.sequence.game(out.deg = c(3, 2, 0, 0, 0, 0), in.deg = c(0, 0, 1, 1, 2, 1))

but the result is not a bipartite graph.

Why not? All the edges go between {1,2} and {3,4,5,6}, right? So this is a bipartite graph. 

If you mean that the graph has no 'type' argument, yes, you need to add that yourself, degree.sequence.game() does not know that it is generating a bipartite graph. You also might want to convert the graph to undirected.

Gabor
 
What am I doing wrong?

Best, 
Caio



_______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help




--
Gabor Csardi <address@hidden>     MTA KFKI RMKI

reply via email to

[Prev in Thread] Current Thread [Next in Thread]