-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optimised SmallestMovedPoint
implementation
#3721
Add optimised SmallestMovedPoint
implementation
#3721
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is of course overall quite sensible, but I do have some nitpicks ;-)
*F FuncSMALLEST_MOVED_POINT_PERM( <self>, <perm> ) | ||
*F Smallest point moved by perm | ||
** | ||
** GAP-level wrapper for 'SmallestMovedPointPerm'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this adds any useful information, as the 2 line implementation makes this info clear anyway. So I'd just remove it.
** GAP-level wrapper for 'SmallestMovedPointPerm'. |
gap> LARGEST_MOVED_POINT_PERM((2,3)); | ||
3 | ||
gap> LARGEST_MOVED_POINT_PERM((2,70000)); | ||
70000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason for these tests was to make 100% sure we test those kernel function, and not some other installed methods.
I guess these days, I'd move those tests to tst/testinstall/kernel/permutat.tst
Thank you both for your comments.they mostly look accurate but I may not be able to address them until Sunday. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Request changes" to mark this issue as not approved, to make sure it doesn't get merged by accident while still waiting for changes by @ChrisJefferson (Chris, this is not meant to bother you into acting, I simply don't want to keep looking at this PR every couple of days, wondering "gee, why is this approved PR not yet merge?", due to my bad memory ;-)
Yes, sorry, I'm trying to do no non-required programming until a paper gets finished :) |
9864eb9
to
ed2cbe1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got a minor question, I'll be happy to approve once you answer it one way or another 🙂
I'll add a test like #3738 which tests SMALLEST_MOVED_POINT_PERM once that PR is merged (I want that one to PR to be merged in first, so it cleanly merges back to 4.11). |
SmallestMovedPoint
implementation
This just adds a SmallestMovedPoint C implementation, as I had a case where the time taken mattered.
We leave a GAP-level implementation for permutations which aren't PERM2s or PERM4s, as SmallestMovedPoint is used on permutations which aren't internal rep.
Note (if interested) we don't have a GAP-level implementation for LargestMovedPoint, as there isn't a sensible algorithm for arbitrary permutation implementations (as we don't have a "largest candidate" to start from, as we do with internal permutations).