igraph_degree_sequence_game — Generates a random graph with a given degree sequence

But returns a random graph with the given weighted edge sequence. I have the weight of edges that enter and of edges that leave each node, and I need to generate random links.

This does not seem like a trivial problem, and I can see multiple interpretations of what you describe. Can you clarify through a concrete example? Show a concrete example input, and a possible valid output from the function.

P.S. The reason why the system held your post for moderation is that it detected that it was pasted (not typed at a typical rate). Did you cross-post it to somewhere else? This is the typical reason why people end up copy/pasting. If you cross-posted, please link to the other instances of this post.

@szhorvat This is a question about moderation, not sample_degseq.
“P.S. The reason why the system held your post for moderation is that it detected that it was pasted (not typed at a typical rate). Did you cross-post it to somewhere else? This is the typical reason why people end up copy/pasting.”
Actually I typically edit in a text editor to avoid the frustration when a web page is inadvertently refreshed and one’s work is lost. So if I compose in a text editor and paste it will always be held for moderation?

I don’t know, but I don’t think so. We are still learning to use Discourse, and adapting as we go. This was a default setting. It is meant to prevent spam messages, so I assume it only applies to first-time posters. If you find any problems with this, do let me know.

The reason I commented on this (for the first time) is because there is a chance that @Alvaro_Sechinel has cross-posted the same question somewhere else. In the past, this auto-moderation action was triggered when people have written a message to the old igraph mailing list, then later posted it here as well. We don’t have a policy against cross-posting, but it is useful to cross-link cross-posts: if someone gives an answer on one forum only, people reading the question on a different forum should have a link to that answer.

So you have no constraints on how many outgoing and incoming connections a vertex can have, or on which other vertices it may connect to. Your only constraints are on the total incoming and outgoing edge weights, for each vertex. Edge weights are non-negative real numbers.

I believe this is the matrix scaling problem. There’s an overview here:

Is there any way to use the generator igraph_degree_sequence_game with positive rational numbers in the arguments in_deg and out_deg?
My idea is to use igraph_degree_sequence_game generator with the sum of edges that enter the node in the argument in_deg and the sum of edges that exit the node in the argument out_deg. I think the output would be equivalent.

No, there is not. The methods used by this function construct unweighted graphs.

You can use the IGRAPH_DEGSEQ_SIMPLE method (i.e. the configuration model) with large positive integers to construct a multigraph, then interpret edge multiplicities as weights. However:

the sampling will not be uniform (see documentation)