feat: rename sample_degseq() method and add the edge.switching.simple method#1376
feat: rename sample_degseq() method and add the edge.switching.simple method#1376aviator-app[bot] merged 9 commits intomainfrom
Conversation
Current Aviator status
This PR was merged using Aviator.
See the real-time status of this PR on the
Aviator webapp.
Use the Aviator Chrome Extension
to see the status of your PR within GitHub.
|
| method <- igraph.match.arg(method) | ||
|
|
||
| if (method == "simple") { | ||
| lifecycle::deprecate_warn("2.0.4", "sample_degseq(method = 'must be configuration instead of simple')") |
There was a problem hiding this comment.
I hesitate between "warn" and "soft".
For enum values in general, you need to look in https://github.com/igraph/igraph/blob/master/include/igraph_constants.h#L94 Enums in C are "named values" represented internally as integers. The numbers are integers. Notice that the first value is explicitly assigned In the majority of cases we start at
Checking that the degree sequence of the result is what we input is the best we can do here. But your test has a problem: you generate an undirected graph then you use both in- and out-degrees, which are for directed graphs. Add It might be useful, but not essential, to also test the undirected case, with an undirected starting point and undirected degrees. |
Do you have an example at hand? |
|
I made edits @szhorvat. Thanks for your feedback! |
|
|
Could you please update the docs by lifting the descriptions of the five methods from the C docs here? https://igraph.org/c/html/latest/igraph-Generators.html#igraph_degree_sequence_game The current R docs have misleading statements. It's quickest to copy-paste the method description from C, and fix up the math so it actually renders are proper math. |
|
I improved the C docs a bit in this commit: igraph/igraph@36a707a |
|
I made some more (independent) doc updates, so I'll just leave this link here instead of linking to comments: https://github.com/igraph/igraph/blob/master/src/games/degree_sequence.c#L671 These updates did not affect the text I suggested you copy, but there's additional information there that might be worth copying (such as the "see also" section). |
|
Is this PR good as is? I should put #1317 nearer the top of my list 😉 |
|
Yes, let's merge this. Further doc improvements are always possible, and should not block this PR. |
… method fix: make edge.switching.simple really possible
…"), with an undirected graph
ed0c786 to
b2676e7
Compare
Fix #876
See @szhorvat, a new feature exposed after all the boring refactoring PRs. 😁 😇 Some questions