Repository navigation
Add a random source argument to the RandomDigraph function - #963
heloiseconolly wants to merge 13 commits into
Conversation
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (97.95%) is below the target coverage (100.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #963 +/- ##
==========================================
- Coverage 97.47% 96.93% -0.55%
==========================================
Files 51 53 +2
Lines 21349 21723 +374
Branches 639 638 -1
==========================================
+ Hits 20811 21057 +246
- Misses 473 602 +129
+ Partials 65 64 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for the PR, @heloiseconolly . There are some issues with the CI which should be resolved:
gap> RandomTournament(10);
Error, no method found! For debugging hints type ?Recovery from NoMe\It seems from the changes you made that now every random digraph function requires a second random source argument. I think it should rather be that the random source should be optional, and in case no random source is found, the function falls back to the prior C implementation with There are some other things I noticed, I'll give a proper review when the CI is passing. Thanks again for the contribution, making it easier to use the GAP random source machinery is a nice feature! |
|
Thank you for the feedback, @reiniscirpons . I am aware of these issues and currently sorting them out; I initially tried using InstallMethodWithRandomSource, but it turns out this doesn't work for constructors. I was then advised to install a method with a random source only for RandomDigraphCons and use GlobalMersenneTwister as an argument in cases with no rs argument, but it seems like a lot of code relies on RandomDigraphCons without a random source argument which is causing tests to fail. I've decided to just install methods with and without a random source separately for each filter, which isn't as neat but will probably work. I forgot to switch this back to a draft PR when I noticed these issues, so apologies for that. |
I rewrote the original C code for RANDOM_DIGRAPH into GAP to avoid the use of the non-reproducible rand() function in C. Additionally, I added an optional random source argument to RandomDigraph.